Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
|
| 2 |
import gradio as gr
|
| 3 |
-
|
| 4 |
from icevision.all import *
|
| 5 |
|
| 6 |
# repo_id = "YOUR_USERNAME/YOUR_LEARNER_NAME"
|
|
@@ -33,7 +33,7 @@ detection_threshold_slider = gr.inputs.Slider(minimum=0, maximum=1, step=0.1, de
|
|
| 33 |
outputs = gr.outputs.Image(type="pil")
|
| 34 |
|
| 35 |
# Option 1: Get an image from local drive
|
| 36 |
-
gr_interface = gr.Interface(fn=show_preds, inputs=["image", display_chkbox_label, display_chkbox_box, detection_threshold_slider], outputs=outputs,examples=['raccoon1.jpg','raccoon2.jpg'])
|
| 37 |
|
| 38 |
# # Option 2: Grab an image from a webcam
|
| 39 |
# gr_interface = gr.Interface(fn=show_preds, inputs=["webcam", display_chkbox_label, display_chkbox_box, detection_threshold_slider], outputs=outputs, title='IceApp - COCO', live=False)
|
|
|
|
| 1 |
+
from huggingface_hub import from_pretrained_fastai
|
| 2 |
import gradio as gr
|
| 3 |
+
from fastai.vision.all import *
|
| 4 |
from icevision.all import *
|
| 5 |
|
| 6 |
# repo_id = "YOUR_USERNAME/YOUR_LEARNER_NAME"
|
|
|
|
| 33 |
outputs = gr.outputs.Image(type="pil")
|
| 34 |
|
| 35 |
# Option 1: Get an image from local drive
|
| 36 |
+
gr_interface = gr.Interface(fn=show_preds, inputs=["image", display_chkbox_label, display_chkbox_box, detection_threshold_slider], outputs=outputs, examples=['raccoon1.jpg','raccoon2.jpg'])
|
| 37 |
|
| 38 |
# # Option 2: Grab an image from a webcam
|
| 39 |
# gr_interface = gr.Interface(fn=show_preds, inputs=["webcam", display_chkbox_label, display_chkbox_box, detection_threshold_slider], outputs=outputs, title='IceApp - COCO', live=False)
|