Jamin252 commited on
Commit
8657b18
·
1 Parent(s): 19cf3a1

Apply model

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # import gradio as gr
2
+ # from fastai.vision.all import *
3
+ # learn = load_learner(" dogIdentifier.pkl")
4
+ # labels = learn.dls.vocab
5
+ # def predict(img):
6
+ # img = PILImage.create(img)
7
+ # pred,pred_idx,probs = learn.predict(img)
8
+ # return {labels[i]: float(probs[i]) for i in range(len(labels))}
9
+
10
+ # iface = gr.Interface(fn=predict, inputs=gr.inputs.Image(shape=(512, 512)), outputs=gr.outputs.Label(num_top_classes=3))
11
+ # iface.launch()
12
+
13
+ import gradio as gr
14
+
15
+ def greet(name):
16
+ return "Hello " + name + "!!"
17
+
18
+ iface = gr.Interface(fn=greet, inputs="text", outputs="text")
19
+ iface.launch()