Omnibus commited on
Commit
539820e
1 Parent(s): a446974

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -91,10 +91,11 @@ def aiornot2(image):
91
  return gr.HTML.update(html_out),results
92
  def load_url(url):
93
  try:
94
- image = Image.open(url)
95
  mes = "Image Loaded"
96
- except Exception:
97
- mes="Image not Found"
 
98
  return image,mes
99
  with gr.Blocks() as app:
100
  with gr.Row():
 
91
  return gr.HTML.update(html_out),results
92
  def load_url(url):
93
  try:
94
+ image = PIL.Image.open(url)
95
  mes = "Image Loaded"
96
+ except Exception as e:
97
+ image=None
98
+ mes=f"Image not Found<br>Error: {e}"
99
  return image,mes
100
  with gr.Blocks() as app:
101
  with gr.Row():