Norakneath commited on
Commit
4df8e36
·
verified ·
1 Parent(s): 9c1365f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 best.pt exists in the working directory)
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
- # 🚀 Ensure the app runs properly in Hugging Face Spaces
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)