lowboonsiong commited on
Commit
cf78d43
·
verified ·
1 Parent(s): 7fc38a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -8
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)