ccwu0918 commited on
Commit
348c2c9
·
1 Parent(s): 913d5d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -9,6 +9,15 @@ from tensorflow.keras.utils import to_categorical
9
  from tensorflow.keras.applications.resnet_v2 import preprocess_input
10
  from tensorflow.keras.preprocessing.image import load_img, img_to_array
11
 
12
- model = load_model('my_cnn_model.h5') # Loading the Tensorflow Saved Model (PB)
13
- print(model.summary())
14
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  from tensorflow.keras.applications.resnet_v2 import preprocess_input
10
  from tensorflow.keras.preprocessing.image import load_img, img_to_array
11
 
 
 
12
 
13
+
14
+ import gradio as gr
15
+
16
+ def greet(name):
17
+
18
+ model = load_model('my_cnn_model.h5') # Loading the Tensorflow Saved Model (PB)
19
+
20
+ return "Hello " + name + "!!" + model.summary()
21
+
22
+ iface = gr.Interface(fn=greet, inputs="text", outputs="text")
23
+ iface.launch()