Spaces:
Runtime error
Runtime error
John Smith
commited on
Commit
·
4ed1df8
1
Parent(s):
82e76f8
Update app.py
Browse files
app.py
CHANGED
@@ -15,9 +15,9 @@ def image_mod(image):
|
|
15 |
resize = tf.image.resize(img, (256, 256))
|
16 |
plt.imshow(resize.numpy().astype(int))
|
17 |
yhat = model.predict(np.expand_dims(resize,0))
|
18 |
-
str(yhat)
|
19 |
#display = np.argmax(yhat)
|
20 |
-
|
|
|
21 |
#if display == "0":
|
22 |
# message = "Rainy" # Jida,_Zhuhai,_rainy_day.jpg
|
23 |
#if display == "1":
|
@@ -28,7 +28,7 @@ def image_mod(image):
|
|
28 |
# message = "Cloudy" #Snow_on_Branches,_Beechview,_2020-12-17,_01.jpg
|
29 |
#if display == "4":
|
30 |
# message = "Snowy" # Daedalus_000355_171913_516869_4578_(36155269413).jpg
|
31 |
-
return
|
32 |
|
33 |
gr.Interface(fn=image_mod,
|
34 |
inputs=gr.Image(shape=(256, 256)),
|
|
|
15 |
resize = tf.image.resize(img, (256, 256))
|
16 |
plt.imshow(resize.numpy().astype(int))
|
17 |
yhat = model.predict(np.expand_dims(resize,0))
|
|
|
18 |
#display = np.argmax(yhat)
|
19 |
+
display = np(yhat)
|
20 |
+
display = str(display)
|
21 |
#if display == "0":
|
22 |
# message = "Rainy" # Jida,_Zhuhai,_rainy_day.jpg
|
23 |
#if display == "1":
|
|
|
28 |
# message = "Cloudy" #Snow_on_Branches,_Beechview,_2020-12-17,_01.jpg
|
29 |
#if display == "4":
|
30 |
# message = "Snowy" # Daedalus_000355_171913_516869_4578_(36155269413).jpg
|
31 |
+
return display
|
32 |
|
33 |
gr.Interface(fn=image_mod,
|
34 |
inputs=gr.Image(shape=(256, 256)),
|