qfisch commited on
Commit
84f5b3e
·
1 Parent(s): 5b7dda8

feat(model): add yolo model

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -4,6 +4,8 @@ import gradio as gr
4
  import numpy as np
5
  import os
6
 
 
 
7
  def predict(input_img) -> tuple[np.ndarray | PIL.Image.Image | str, list[tuple[np.ndarray | tuple[int, int, int, int], str]]]:
8
  res = model(input_img)
9
  if len(res) == 0:
@@ -38,5 +40,4 @@ gradio_app = gr.Interface(
38
 
39
 
40
  if __name__ == "__main__":
41
- model = YOLO("best.pt")
42
- gradio_app.launch(debug=True)
 
4
  import numpy as np
5
  import os
6
 
7
+ model = YOLO("best.pt")
8
+
9
  def predict(input_img) -> tuple[np.ndarray | PIL.Image.Image | str, list[tuple[np.ndarray | tuple[int, int, int, int], str]]]:
10
  res = model(input_img)
11
  if len(res) == 0:
 
40
 
41
 
42
  if __name__ == "__main__":
43
+ gradio_app.launch()