home.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!-- This is a Jinja2 Template that extends layout.html
  2. Implements a simple Bootstrap 5 form submission interface for YOLOv5 detection.
  3. -->
  4. {% extends "layout.html" %} {% block title %}
  5. <title>YOLOv5 Demo</title>
  6. {% endblock %} {% block content %}
  7. <div class="m-2">
  8. <h5>Upload image(s) and select a YOLOv5 model</h5>
  9. <hr />
  10. <form method="post" action="" enctype="multipart/form-data">
  11. <div class="my-2">
  12. <label for="file_list" class="form-label">Upload Images</label>
  13. <input
  14. class="form-control w-auto"
  15. type="file"
  16. name="file_list"
  17. id="file_list"
  18. multiple
  19. />
  20. </div>
  21. <div class="my-2">
  22. <div class="form-group">
  23. <label>Select YOLO Model</label>
  24. </div>
  25. <select class="form-select w-auto" name="model_name">
  26. {% for selection in model_selection_options %}
  27. <option value="{{ selection }}">{{ selection }}</option>
  28. {% endfor %}
  29. </select>
  30. </div>
  31. <div class="my-2">
  32. <label for="img_size_input" class="form-label"
  33. >Model Inference Size</label
  34. >
  35. <input
  36. type="text"
  37. class="form-control w-auto"
  38. id="img_size_input"
  39. name="img_size"
  40. value="1824"
  41. />
  42. </div>
  43. <button class="btn btn-primary" type="submit">Submit</button>
  44. </form>
  45. </div>
  46. {% endblock %}