Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,10 @@
|
|
1 |
-
!pip3 install ultralytics
|
2 |
-
|
3 |
from ultralytics import YOLO
|
4 |
from PIL import Image
|
5 |
import gradio as gr
|
6 |
from huggingface_hub import snapshot_download
|
7 |
import os
|
8 |
|
9 |
-
model_path = "/Users/fevot/Downloads/best_int8_openvino_model"
|
10 |
|
11 |
def load_model(repo_id):
|
12 |
download_dir = snapshot_download(repo_id)
|
@@ -29,7 +27,7 @@ def predict(pilimg):
|
|
29 |
return out_pilimg
|
30 |
|
31 |
|
32 |
-
REPO_ID = "fevot/
|
33 |
detection_model = load_model(REPO_ID)
|
34 |
|
35 |
gr.Interface(fn=predict,
|
|
|
|
|
|
|
1 |
from ultralytics import YOLO
|
2 |
from PIL import Image
|
3 |
import gradio as gr
|
4 |
from huggingface_hub import snapshot_download
|
5 |
import os
|
6 |
|
7 |
+
# model_path = "/Users/fevot/Downloads/best_int8_openvino_model"
|
8 |
|
9 |
def load_model(repo_id):
|
10 |
download_dir = snapshot_download(repo_id)
|
|
|
27 |
return out_pilimg
|
28 |
|
29 |
|
30 |
+
REPO_ID = "fevot/construction-yolov8"
|
31 |
detection_model = load_model(REPO_ID)
|
32 |
|
33 |
gr.Interface(fn=predict,
|