Spaces:
Runtime error
Runtime error
John Smith
commited on
Commit
·
c0d6cc2
1
Parent(s):
e3cbd34
Update app.py
Browse files
app.py
CHANGED
@@ -17,17 +17,17 @@ def image_mod(image):
|
|
17 |
yhat = model.predict(np.expand_dims(resize,0))
|
18 |
display = np.argmax(yhat)
|
19 |
display = str(display)
|
20 |
-
if display == "0":
|
21 |
-
|
22 |
-
if display == "1":
|
23 |
-
|
24 |
-
if display == "2":
|
25 |
-
|
26 |
-
if display == "3":
|
27 |
-
|
28 |
-
if display == "4":
|
29 |
-
|
30 |
-
return
|
31 |
|
32 |
gr.Interface(fn=image_mod,
|
33 |
inputs=gr.Image(shape=(256, 256)),
|
|
|
17 |
yhat = model.predict(np.expand_dims(resize,0))
|
18 |
display = np.argmax(yhat)
|
19 |
display = str(display)
|
20 |
+
#if display == "0":
|
21 |
+
# message = "Rainy" # Jida,_Zhuhai,_rainy_day.jpg
|
22 |
+
#if display == "1":
|
23 |
+
# message = "Sunny" # Morning_fog_-_Flickr_-_tmoravec.jpg
|
24 |
+
#if display == "2":
|
25 |
+
# message = "Foggy" # Stuyvesant_Fish_House_25_E78_St_cloudy_jeh.jpg
|
26 |
+
#if display == "3":
|
27 |
+
# message = "Cloudy" #Snow_on_Branches,_Beechview,_2020-12-17,_01.jpg
|
28 |
+
#if display == "4":
|
29 |
+
# message = "Snowy" # Daedalus_000355_171913_516869_4578_(36155269413).jpg
|
30 |
+
return display
|
31 |
|
32 |
gr.Interface(fn=image_mod,
|
33 |
inputs=gr.Image(shape=(256, 256)),
|