Spaces:
Running
on
Zero
Running
on
Zero
Martin Tomov
commited on
output fix attempt
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import os
|
2 |
-
os.system('pip install gradio==4.29.0')
|
3 |
|
4 |
import random
|
5 |
from dataclasses import dataclass
|
@@ -40,8 +40,7 @@ class DetectionResult:
|
|
40 |
box=BoundingBox(
|
41 |
xmin=detection_dict['box']['xmin'],
|
42 |
ymin=detection_dict['box']['ymin'],
|
43 |
-
xmax=detection_dict['box']['xmax']
|
44 |
-
ymax=detection_dict['box']['ymax']
|
45 |
)
|
46 |
)
|
47 |
|
@@ -197,4 +196,4 @@ gr.Interface(
|
|
197 |
inputs=gr.Image(type="pil"),
|
198 |
outputs=[gr.Image(type="numpy"), gr.Image(type="numpy")],
|
199 |
title="π InsectSAM + GroundingDINO Inference",
|
200 |
-
).launch()
|
|
|
1 |
import os
|
2 |
+
os.system('pip install gradio==4.29.0') # as gradio==4.29.0 doesn't work in requirements.txt
|
3 |
|
4 |
import random
|
5 |
from dataclasses import dataclass
|
|
|
40 |
box=BoundingBox(
|
41 |
xmin=detection_dict['box']['xmin'],
|
42 |
ymin=detection_dict['box']['ymin'],
|
43 |
+
xmax=detection_dict['box']['xmax']
|
|
|
44 |
)
|
45 |
)
|
46 |
|
|
|
196 |
inputs=gr.Image(type="pil"),
|
197 |
outputs=[gr.Image(type="numpy"), gr.Image(type="numpy")],
|
198 |
title="π InsectSAM + GroundingDINO Inference",
|
199 |
+
).launch()
|