More
Browse files- app.py +10 -3
- export.pkl +3 -0
- packages.txt +0 -0
- requirements.txt +0 -0
app.py
CHANGED
@@ -1,7 +1,14 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
|
4 |
-
return "Hello " + name + "!!"
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
import fastai.vision.all import *
|
3 |
|
4 |
+
learn_inf = load_learner('export.pkl')
|
|
|
5 |
|
6 |
+
def greet(image):
|
7 |
+
|
8 |
+
pred,pred_idx,probs = learn_inf.predict(image)
|
9 |
+
return f'Prediction: {pred}; Probability: {probs[pred_idx]:.04f}'
|
10 |
+
|
11 |
+
image = gr.inputs.Image(shape=(192,192))
|
12 |
+
label = gr.outputs.Label()
|
13 |
+
iface = gr.Interface(fn=greet, inputs=image, outputs=label)
|
14 |
iface.launch()
|
export.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:737d462d92715245201eedf66e4e7500865d879c2d4f6828f7e8fe09c153010d
|
3 |
+
size 46972641
|
packages.txt
ADDED
File without changes
|
requirements.txt
ADDED
File without changes
|