initial commit
Browse files- app.py +16 -0
- model.pkl +3 -0
- requirements.txt +2 -0
app.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from fastai.vision.all import *
|
| 3 |
+
import skimage
|
| 4 |
+
|
| 5 |
+
learn = load_learner('model.pkl')
|
| 6 |
+
|
| 7 |
+
labels = learn.dls.vocab
|
| 8 |
+
|
| 9 |
+
title = "Lesson 4"
|
| 10 |
+
interpretation='default'
|
| 11 |
+
enable_queue=True
|
| 12 |
+
|
| 13 |
+
gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=5),title=title,examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch()
|
| 14 |
+
|
| 15 |
+
iface = gr.Interface(fn=learn)
|
| 16 |
+
iface.launch()
|
model.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9006ac2b097de5d960033418785a61da2cffecd81898628ffb02b941fd5fdbfa
|
| 3 |
+
size 567647705
|
requirements.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
fastai
|
| 2 |
+
scikit-image
|