Update app.py
Browse files
app.py
CHANGED
@@ -7,12 +7,11 @@ def psnr(y_true, y_pred):
|
|
7 |
from keras.models import load_model
|
8 |
model = load_model("./MyNet.h5", custom_objects={'psnr': psnr, 'val_psnr': psnr})
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
return {flower_classes[i]: float(prediction[i]) for i in range(5)}
|
15 |
|
16 |
image = gr.inputs.Image(shape=(256,256))
|
17 |
|
18 |
-
gr.Interface(fn=predict_input_image, inputs=image, outputs=
|
|
|
7 |
from keras.models import load_model
|
8 |
model = load_model("./MyNet.h5", custom_objects={'psnr': psnr, 'val_psnr': psnr})
|
9 |
|
10 |
+
decoded_imgs = model.predict(image)
|
11 |
+
|
12 |
+
#decoded_imgs.reshape(256,256,3)
|
13 |
+
#prediction=model.predict(img_4d)[0]
|
|
|
14 |
|
15 |
image = gr.inputs.Image(shape=(256,256))
|
16 |
|
17 |
+
gr.Interface(fn=predict_input_image, inputs=image, outputs=decoded_imgs,interpretation='default').launch(debug='True')
|