Spaces:
Runtime error
Runtime error
Max
commited on
Commit
·
d4a9222
1
Parent(s):
c3748ad
Updated app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from fastai.vision.all import *
|
| 3 |
|
|
@@ -13,8 +16,8 @@ def classify_image(img):
|
|
| 13 |
return dict(zip(categories, map(float, probs)))
|
| 14 |
|
| 15 |
# Build the Gradio interface
|
| 16 |
-
image = gr.
|
| 17 |
-
label = gr.
|
| 18 |
examples = ["polar.jpg", "mediterranean.jpg", "humid_subtropical.jpg"]
|
| 19 |
|
| 20 |
intf = gr.Interface(fn=classify_image,
|
|
|
|
| 1 |
+
# You need a requirements.txt file for dependencies in Spaces ('pipreqs /path' or 'pipreqs' in CWD will
|
| 2 |
+
# automatically generate a requirements.txt file for you).
|
| 3 |
+
|
| 4 |
import gradio as gr
|
| 5 |
from fastai.vision.all import *
|
| 6 |
|
|
|
|
| 16 |
return dict(zip(categories, map(float, probs)))
|
| 17 |
|
| 18 |
# Build the Gradio interface
|
| 19 |
+
image = gr.Image(shape=(192,192))
|
| 20 |
+
label = gr.Label()
|
| 21 |
examples = ["polar.jpg", "mediterranean.jpg", "humid_subtropical.jpg"]
|
| 22 |
|
| 23 |
intf = gr.Interface(fn=classify_image,
|