SakshiRathi77 commited on
Commit
ce35285
·
verified ·
1 Parent(s): 611a237

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -35
app.py CHANGED
@@ -4,7 +4,7 @@ from huggingface_hub import hf_hub_download
4
 
5
 
6
  def download_models(model_id):
7
- hf_hub_download("merve/yolov9", filename=f"{model_id}", local_dir=f"./")
8
  return f"./{model_id}"
9
 
10
  @spaces.GPU
@@ -48,12 +48,9 @@ def app():
48
  model_path = gr.Dropdown(
49
  label="Model",
50
  choices=[
51
- "gelan-c.pt",
52
- "gelan-e.pt",
53
- "yolov9-c.pt",
54
- "yolov9-e.pt",
55
  ],
56
- value="gelan-e.pt",
57
  )
58
  image_size = gr.Slider(
59
  label="Image Size",
@@ -93,34 +90,34 @@ def app():
93
  outputs=[output_numpy],
94
  )
95
 
96
- gr.Examples(
97
- examples=[
98
- [
99
- "data/zidane.jpg",
100
- "gelan-e.pt",
101
- 640,
102
- 0.4,
103
- 0.5,
104
- ],
105
- [
106
- "data/huggingface.jpg",
107
- "yolov9-c.pt",
108
- 640,
109
- 0.4,
110
- 0.5,
111
- ],
112
- ],
113
- fn=yolov9_inference,
114
- inputs=[
115
- img_path,
116
- model_path,
117
- image_size,
118
- conf_threshold,
119
- iou_threshold,
120
- ],
121
- outputs=[output_numpy],
122
- cache_examples=True,
123
- )
124
 
125
 
126
  gradio_app = gr.Blocks()
@@ -135,7 +132,6 @@ with gradio_app:
135
  """
136
  <h3 style='text-align: center'>
137
  Follow me for more!
138
- <a href='https://twitter.com/kadirnar_ai' target='_blank'>Twitter</a> | <a href='https://github.com/kadirnar' target='_blank'>Github</a> | <a href='https://www.linkedin.com/in/kadir-nar/' target='_blank'>Linkedin</a> | <a href='https://www.huggingface.co/kadirnar/' target='_blank'>HuggingFace</a>
139
  </h3>
140
  """)
141
  with gr.Row():
 
4
 
5
 
6
  def download_models(model_id):
7
+ hf_hub_download("SakshiRathi77/void-space-detection/weights", filename=f"{model_id}", local_dir=f"./")
8
  return f"./{model_id}"
9
 
10
  @spaces.GPU
 
48
  model_path = gr.Dropdown(
49
  label="Model",
50
  choices=[
51
+ "best.pt"
 
 
 
52
  ],
53
+ value="best.pt",
54
  )
55
  image_size = gr.Slider(
56
  label="Image Size",
 
90
  outputs=[output_numpy],
91
  )
92
 
93
+ # gr.Examples(
94
+ # examples=[
95
+ # [
96
+ # "data/zidane.jpg",
97
+ # "gelan-e.pt",
98
+ # 640,
99
+ # 0.4,
100
+ # 0.5,
101
+ # ],
102
+ # [
103
+ # "data/huggingface.jpg",
104
+ # "yolov9-c.pt",
105
+ # 640,
106
+ # 0.4,
107
+ # 0.5,
108
+ # ],
109
+ # ],
110
+ # fn=yolov9_inference,
111
+ # inputs=[
112
+ # img_path,
113
+ # model_path,
114
+ # image_size,
115
+ # conf_threshold,
116
+ # iou_threshold,
117
+ # ],
118
+ # outputs=[output_numpy],
119
+ # cache_examples=True,
120
+ # )
121
 
122
 
123
  gradio_app = gr.Blocks()
 
132
  """
133
  <h3 style='text-align: center'>
134
  Follow me for more!
 
135
  </h3>
136
  """)
137
  with gr.Row():