Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -162,7 +162,7 @@ def video_fn(video_in_filepath):
|
|
| 162 |
cv2.waitKey(1)
|
| 163 |
return video_out_filepath
|
| 164 |
|
| 165 |
-
REPO_ID = "23b719w/
|
| 166 |
detection_model = load_model()
|
| 167 |
# pil_image = Image.open(image_path)
|
| 168 |
# image_arr = pil_image_as_numpy_array(pil_image)
|
|
@@ -171,8 +171,8 @@ detection_model = load_model()
|
|
| 171 |
# predicted_img.save('predicted.jpg')
|
| 172 |
|
| 173 |
gr.Interface(fn=predict,
|
| 174 |
-
inputs=[gr.Image(type="pil",label="Input Image",height=500,width=
|
| 175 |
-
outputs=[gr.Image(type="pil",label="Output Image",height=500,width=
|
| 176 |
title="Facemask & Glasses",
|
| 177 |
description="Model: ssd_mobilenet_v2_320x320",
|
| 178 |
theme=gr.themes.Soft(primary_hue="blue", secondary_hue="sky"),
|
|
|
|
| 162 |
cv2.waitKey(1)
|
| 163 |
return video_out_filepath
|
| 164 |
|
| 165 |
+
REPO_ID = "23b719w/assignment2tfod_model2"
|
| 166 |
detection_model = load_model()
|
| 167 |
# pil_image = Image.open(image_path)
|
| 168 |
# image_arr = pil_image_as_numpy_array(pil_image)
|
|
|
|
| 171 |
# predicted_img.save('predicted.jpg')
|
| 172 |
|
| 173 |
gr.Interface(fn=predict,
|
| 174 |
+
inputs=[gr.Image(type="pil",label="Input Image",height=500,width=800),gr.Video(label="Input Video",height=500,width=800),gr.Textbox(placeholder="0.50",label="Set the confidence threshold (0.00-1.00)")],
|
| 175 |
+
outputs=[gr.Image(type="pil",label="Output Image",height=500,width=800),gr.Video(label="Output Video",height=500,width=800)],
|
| 176 |
title="Facemask & Glasses",
|
| 177 |
description="Model: ssd_mobilenet_v2_320x320",
|
| 178 |
theme=gr.themes.Soft(primary_hue="blue", secondary_hue="sky"),
|