Update app.py
Browse files
app.py
CHANGED
@@ -4,13 +4,7 @@ import gradio as gr
|
|
4 |
from huggingface_hub import snapshot_download
|
5 |
import os
|
6 |
|
7 |
-
model_path = "/Users/markk/Downloads/best_int8_openvino_model"
|
8 |
-
|
9 |
def load_model(repo_id):
|
10 |
-
download_dir = snapshot_download(repo_id)
|
11 |
-
print(download_dir)
|
12 |
-
path = os.path.join(download_dir, "")
|
13 |
-
print(path)
|
14 |
detection_model = YOLO('best.pt', task='detect')
|
15 |
return detection_model
|
16 |
|
@@ -33,5 +27,4 @@ detection_model = load_model(REPO_ID)
|
|
33 |
gr.Interface(fn=predict,
|
34 |
inputs=gr.Image(type="pil"),
|
35 |
outputs=gr.Image(type="pil")
|
36 |
-
).launch(share=True)
|
37 |
-
|
|
|
4 |
from huggingface_hub import snapshot_download
|
5 |
import os
|
6 |
|
|
|
|
|
7 |
def load_model(repo_id):
|
|
|
|
|
|
|
|
|
8 |
detection_model = YOLO('best.pt', task='detect')
|
9 |
return detection_model
|
10 |
|
|
|
27 |
gr.Interface(fn=predict,
|
28 |
inputs=gr.Image(type="pil"),
|
29 |
outputs=gr.Image(type="pil")
|
30 |
+
).launch(share=True)
|
|