Spaces:
Sleeping
Sleeping
Update app.py (#1)
Browse files- Update app.py (b519821529bd48aac877c40075871b053d268648)
Co-authored-by: L_Ai_n <not-lain@users.noreply.huggingface.co>
app.py
CHANGED
|
@@ -7,13 +7,13 @@ def predict(input_img):
|
|
| 7 |
predictions = pipeline(input_img , threshold=0.5, #optional parameter defaults to 0
|
| 8 |
return_scores = False #optional parameter defaults to False
|
| 9 |
)
|
| 10 |
-
return
|
| 11 |
|
| 12 |
gradio_app = gr.Interface(
|
| 13 |
predict,
|
| 14 |
-
inputs=gr.Image(label="
|
| 15 |
-
outputs=
|
| 16 |
-
title="
|
| 17 |
)
|
| 18 |
|
| 19 |
if __name__ == "__main__":
|
|
|
|
| 7 |
predictions = pipeline(input_img , threshold=0.5, #optional parameter defaults to 0
|
| 8 |
return_scores = False #optional parameter defaults to False
|
| 9 |
)
|
| 10 |
+
return predictions
|
| 11 |
|
| 12 |
gradio_app = gr.Interface(
|
| 13 |
predict,
|
| 14 |
+
inputs=gr.Image(label="add your image here", sources=['upload', 'webcam'], type="pil"),
|
| 15 |
+
outputs=gr.Text(),
|
| 16 |
+
title="Image Annotator",
|
| 17 |
)
|
| 18 |
|
| 19 |
if __name__ == "__main__":
|