ahuang11 commited on
Commit
1ce0976
β€’
1 Parent(s): ef9ded4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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(",")