tarasevicius commited on
Commit
bb622fc
·
1 Parent(s): 27f82ce

feat: use model from repo

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,10 +1,12 @@
1
  import gradio as gr
2
  from ultralytics import YOLO
3
  from PIL import Image
4
- import numpy as np
5
-
6
 
7
- model = YOLO('model.pt')
 
 
 
8
 
9
  # Print model class names
10
  print("Model class names:", model.names)
 
1
  import gradio as gr
2
  from ultralytics import YOLO
3
  from PIL import Image
4
+ from huggingface_hub import hf_hub_download
 
5
 
6
+ import numpy as np
7
+ model_path = hf_hub_download(repo_id='ethandavey/yoloV5-coursework-model', filename='temp.pt')
8
+ # Load the model
9
+ model = YOLO(model_path)
10
 
11
  # Print model class names
12
  print("Model class names:", model.names)