zachwormgoor@gmail.com
commited on
Commit
•
dfd85a3
1
Parent(s):
5cd635a
Better response
Browse files
app.py
CHANGED
@@ -80,8 +80,8 @@ def classify_image_url_debug(url_text):
|
|
80 |
img = im.to_thumb(256,256)
|
81 |
#resize_images(dest, max_size=400, dest=dest)
|
82 |
os.remove(dest)
|
83 |
-
|
84 |
-
return "Success"
|
85 |
except Exception as ex:
|
86 |
# in case there is any error, invalid URL or invalid image, etc., not sure how Gradio will handle a runtime exception so catching it to be safe
|
87 |
#return { categories[0]: 0.0, categories[1]: 0.0 }
|
|
|
80 |
img = im.to_thumb(256,256)
|
81 |
#resize_images(dest, max_size=400, dest=dest)
|
82 |
os.remove(dest)
|
83 |
+
temp = classify_image(img)
|
84 |
+
return "Success: " + str(temp)
|
85 |
except Exception as ex:
|
86 |
# in case there is any error, invalid URL or invalid image, etc., not sure how Gradio will handle a runtime exception so catching it to be safe
|
87 |
#return { categories[0]: 0.0, categories[1]: 0.0 }
|