Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
from keras.models import model_from_json
|
3 |
from keras.preprocessing import image
|
4 |
import heapq
|
@@ -26,7 +27,7 @@ def predict_image(pic):
|
|
26 |
img = image.load_img(pic, target_size=(224, 224))
|
27 |
x = image.img_to_array(img)
|
28 |
x = np.expand_dims(x, axis=0)
|
29 |
-
x = preprocess_input(x)
|
30 |
preds = loaded_model.predict(x)
|
31 |
preds = list(preds[0])
|
32 |
|
|
|
1 |
import gradio as gr
|
2 |
+
import pandas as np
|
3 |
from keras.models import model_from_json
|
4 |
from keras.preprocessing import image
|
5 |
import heapq
|
|
|
27 |
img = image.load_img(pic, target_size=(224, 224))
|
28 |
x = image.img_to_array(img)
|
29 |
x = np.expand_dims(x, axis=0)
|
30 |
+
#x = preprocess_input(x)
|
31 |
preds = loaded_model.predict(x)
|
32 |
preds = list(preds[0])
|
33 |
|