Spaces:
Runtime error
Runtime error
Commit
·
9acf33d
1
Parent(s):
c72f916
Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,8 @@ import io
|
|
12 |
from random import choice
|
13 |
|
14 |
|
15 |
-
image_processor_tiny = AutoImageProcessor.from_pretrained("/
|
16 |
-
model_tiny = AutoModelForObjectDetection.from_pretrained("/
|
17 |
|
18 |
import gradio as gr
|
19 |
|
@@ -96,7 +96,7 @@ with gr.Blocks(title="YOLOS Object Detection - ClassCat",
|
|
96 |
threshold = gr.Slider(0, 1.0, value=0.9, label='threshold')
|
97 |
|
98 |
gr.HTML("""<br/>""")
|
99 |
-
gr.HTML("""<h4 style="color:navy;">4. Then, click "Infer" button to predict object instances
|
100 |
|
101 |
send_btn = gr.Button("Infer")
|
102 |
send_btn.click(fn=infer, inputs=[input_image, model, threshold], outputs=[output_image])
|
@@ -104,7 +104,7 @@ with gr.Blocks(title="YOLOS Object Detection - ClassCat",
|
|
104 |
gr.HTML("""<br/>""")
|
105 |
gr.HTML("""<h4 style="color:navy;">Reference</h4>""")
|
106 |
gr.HTML("""<ul>""")
|
107 |
-
gr.HTML("""<li><a href="https://huggingface.co/docs/transformers/model_doc/yolos" target="_blank">Hugging Face Transformers -
|
108 |
gr.HTML("""</ul>""")
|
109 |
|
110 |
|
|
|
12 |
from random import choice
|
13 |
|
14 |
|
15 |
+
image_processor_tiny = AutoImageProcessor.from_pretrained("foduucom/object_detection")
|
16 |
+
model_tiny = AutoModelForObjectDetection.from_pretrained("foduucom/object_detection")
|
17 |
|
18 |
import gradio as gr
|
19 |
|
|
|
96 |
threshold = gr.Slider(0, 1.0, value=0.9, label='threshold')
|
97 |
|
98 |
gr.HTML("""<br/>""")
|
99 |
+
gr.HTML("""<h4 style="color:navy;">4. Then, click "Infer" button to predict object instances.</h4>""")
|
100 |
|
101 |
send_btn = gr.Button("Infer")
|
102 |
send_btn.click(fn=infer, inputs=[input_image, model, threshold], outputs=[output_image])
|
|
|
104 |
gr.HTML("""<br/>""")
|
105 |
gr.HTML("""<h4 style="color:navy;">Reference</h4>""")
|
106 |
gr.HTML("""<ul>""")
|
107 |
+
gr.HTML("""<li><a href="https://huggingface.co/docs/transformers/model_doc/yolos" target="_blank">Hugging Face Transformers - YOLOv8n</a>""")
|
108 |
gr.HTML("""</ul>""")
|
109 |
|
110 |
|