Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from ultralytics import YOLO
|
|
3 |
from PIL import Image, ImageDraw, ImageFont
|
4 |
import random
|
5 |
|
6 |
-
# Load YOLO model (ensure
|
7 |
YOLO_MODEL_PATH = "120epochs.pt"
|
8 |
model = YOLO(YOLO_MODEL_PATH, task='detect').to("cpu")
|
9 |
|
@@ -113,6 +113,6 @@ with gr.Blocks() as iface:
|
|
113 |
]
|
114 |
)
|
115 |
|
116 |
-
# 🚀
|
117 |
if __name__ == "__main__":
|
118 |
iface.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
3 |
from PIL import Image, ImageDraw, ImageFont
|
4 |
import random
|
5 |
|
6 |
+
# Load YOLO model (ensure the model file exists in the working directory)
|
7 |
YOLO_MODEL_PATH = "120epochs.pt"
|
8 |
model = YOLO(YOLO_MODEL_PATH, task='detect').to("cpu")
|
9 |
|
|
|
113 |
]
|
114 |
)
|
115 |
|
116 |
+
# 🚀 Run the app locally
|
117 |
if __name__ == "__main__":
|
118 |
iface.launch(server_name="0.0.0.0", server_port=7860)
|