Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
|
@@ -101,7 +101,7 @@ def prediction(image_path):
|
|
| 101 |
ax[1].imshow(image_np,aspect='auto');
|
| 102 |
|
| 103 |
|
| 104 |
-
return objects,
|
| 105 |
|
| 106 |
|
| 107 |
|
|
@@ -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 |
-
return simplejson.dumps(response),
|
| 133 |
|
| 134 |
inputs = gr.inputs.Image(type = 'filepath')
|
| 135 |
EXAMPLES = ["img1.jpg","img2.jpg","img6.jpg","img7.jpg","img8.jpg","img4.jpg","img10.jpg"]
|
|
@@ -148,4 +148,5 @@ demo_app = gr.Interface(
|
|
| 148 |
#live = True,
|
| 149 |
theme = 'huggingface'
|
| 150 |
)
|
| 151 |
-
demo_app.launch()
|
|
|
|
|
|
| 101 |
ax[1].imshow(image_np,aspect='auto');
|
| 102 |
|
| 103 |
|
| 104 |
+
return objects,image_np
|
| 105 |
|
| 106 |
|
| 107 |
|
|
|
|
| 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),image_np
|
| 133 |
|
| 134 |
inputs = gr.inputs.Image(type = 'filepath')
|
| 135 |
EXAMPLES = ["img1.jpg","img2.jpg","img6.jpg","img7.jpg","img8.jpg","img4.jpg","img10.jpg"]
|
|
|
|
| 148 |
#live = True,
|
| 149 |
theme = 'huggingface'
|
| 150 |
)
|
| 151 |
+
demo_app.launch()
|
| 152 |
+
|