Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -62,6 +62,7 @@ async def process_inputs(class_names: List[str], image_url: str):
|
|
62 |
classification results as panel objects.
|
63 |
"""
|
64 |
try:
|
|
|
65 |
if not image_url:
|
66 |
yield "##### β οΈ Provide an image URL"
|
67 |
return
|
@@ -72,7 +73,6 @@ async def process_inputs(class_names: List[str], image_url: str):
|
|
72 |
img = pn.pane.Image(pil_img, height=400, align="center")
|
73 |
except Exception as e:
|
74 |
yield f"##### π Something went wrong, please try a different URL!"
|
75 |
-
main.disabled = False
|
76 |
return
|
77 |
|
78 |
class_items = class_names.split(",")
|
|
|
62 |
classification results as panel objects.
|
63 |
"""
|
64 |
try:
|
65 |
+
main.disabled = True
|
66 |
if not image_url:
|
67 |
yield "##### β οΈ Provide an image URL"
|
68 |
return
|
|
|
73 |
img = pn.pane.Image(pil_img, height=400, align="center")
|
74 |
except Exception as e:
|
75 |
yield f"##### π Something went wrong, please try a different URL!"
|
|
|
76 |
return
|
77 |
|
78 |
class_items = class_names.split(",")
|