Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -290,6 +290,7 @@ def predict(image):
|
|
| 290 |
|
| 291 |
print("Min value of image after normalization:", np.min(annotated_img))
|
| 292 |
print("Max value of image after normalization:", np.max(annotated_img))
|
|
|
|
| 293 |
|
| 294 |
# Convert to PIL Image
|
| 295 |
# annotated_img = Image.fromarray(annotated_img)
|
|
@@ -300,8 +301,8 @@ def predict(image):
|
|
| 300 |
demo = gr.Interface(
|
| 301 |
fn=predict,
|
| 302 |
inputs=gr.Image(sources=["webcam"], type="numpy"), # Accepts image input
|
| 303 |
-
outputs="image" # Customize based on your output format
|
| 304 |
-
|
| 305 |
)
|
| 306 |
|
| 307 |
if __name__ == "__main__":
|
|
|
|
| 290 |
|
| 291 |
print("Min value of image after normalization:", np.min(annotated_img))
|
| 292 |
print("Max value of image after normalization:", np.max(annotated_img))
|
| 293 |
+
print("Type of annotated_img after normalization:", type(annotated_img))
|
| 294 |
|
| 295 |
# Convert to PIL Image
|
| 296 |
# annotated_img = Image.fromarray(annotated_img)
|
|
|
|
| 301 |
demo = gr.Interface(
|
| 302 |
fn=predict,
|
| 303 |
inputs=gr.Image(sources=["webcam"], type="numpy"), # Accepts image input
|
| 304 |
+
# outputs="image" # Customize based on your output format
|
| 305 |
+
outputs=gr.Image(type="numpy"), # Accepts image input
|
| 306 |
)
|
| 307 |
|
| 308 |
if __name__ == "__main__":
|