Elvis120 commited on
Commit
5118c25
·
1 Parent(s): 698707c

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import gradio as gr
3
+ from tensorflow import keras
4
+
5
+ model = keras.models.load_model('my_model')
6
+
7
+ def greet(img):
8
+ img = np.expand_dims(img, axis=0)
9
+ return np.argmax(model.predict(img)[0])
10
+
11
+
12
+ demo = gr.Interface(fn=greet, inputs="sketchpad", outputs="text")
13
+
14
+ demo.launch()