Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
|
@@ -129,7 +129,7 @@ def prediction(image_path):
|
|
| 129 |
response = {"predictions": [result]}
|
| 130 |
total_time_end = time.time()
|
| 131 |
print("total time : ",round((total_time_end-total_time_start),2))
|
| 132 |
-
|
| 133 |
|
| 134 |
inputs = gr.inputs.Image(type = 'filepath')
|
| 135 |
EXAMPLES = ["img1.jpg","img2.jpg","img3.jpg","img4.jpg"]
|
|
@@ -141,7 +141,7 @@ DESCRIPTION = """An image is occluded if the image is blocked by any object.
|
|
| 141 |
demo_app = gr.Interface(
|
| 142 |
fn= prediction,
|
| 143 |
inputs=inputs,
|
| 144 |
-
outputs= "
|
| 145 |
title = "Tag Diciphering",
|
| 146 |
description = DESCRIPTION,
|
| 147 |
examples = EXAMPLES,
|
|
|
|
| 129 |
response = {"predictions": [result]}
|
| 130 |
total_time_end = time.time()
|
| 131 |
print("total time : ",round((total_time_end-total_time_start),2))
|
| 132 |
+
return simplejson.dumps(response)
|
| 133 |
|
| 134 |
inputs = gr.inputs.Image(type = 'filepath')
|
| 135 |
EXAMPLES = ["img1.jpg","img2.jpg","img3.jpg","img4.jpg"]
|
|
|
|
| 141 |
demo_app = gr.Interface(
|
| 142 |
fn= prediction,
|
| 143 |
inputs=inputs,
|
| 144 |
+
outputs= "text",
|
| 145 |
title = "Tag Diciphering",
|
| 146 |
description = DESCRIPTION,
|
| 147 |
examples = EXAMPLES,
|