Spaces:
Sleeping
Sleeping
Apply model
Browse files
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()
|