Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -207,6 +207,10 @@ def point(img, object):
|
|
| 207 |
|
| 208 |
@spaces.GPU(duration=10)
|
| 209 |
def localized_query(img, x, y, question):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
w, h = img.size
|
| 211 |
x, y = x * w, y * h
|
| 212 |
img_clone = img.copy()
|
|
|
|
| 207 |
|
| 208 |
@spaces.GPU(duration=10)
|
| 209 |
def localized_query(img, x, y, question):
|
| 210 |
+
if img is None:
|
| 211 |
+
yield "", {"text": "", "entities": []}, gr.update(visible=False, value=None)
|
| 212 |
+
return
|
| 213 |
+
|
| 214 |
w, h = img.size
|
| 215 |
x, y = x * w, y * h
|
| 216 |
img_clone = img.copy()
|