Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
def is_cat(x):
|
|
@@ -11,13 +11,11 @@ def classify_image(img):
|
|
| 11 |
pred, idx, probs = learn.predict(img)
|
| 12 |
return dict(zip(categorieries, map(float, probs)))
|
| 13 |
|
| 14 |
-
image = gr.inputs.Image(shape=(192, 192))
|
| 15 |
-
label = gr.outputs.Label()
|
| 16 |
-
|
| 17 |
intf = gr.Interface(
|
| 18 |
fn=classify_image,
|
| 19 |
-
inputs=
|
| 20 |
-
outputs=
|
|
|
|
| 21 |
)
|
| 22 |
|
| 23 |
-
intf.launch(inline=False
|
|
|
|
| 1 |
+
Copyfrom fastai.vision.all import *
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
def is_cat(x):
|
|
|
|
| 11 |
pred, idx, probs = learn.predict(img)
|
| 12 |
return dict(zip(categorieries, map(float, probs)))
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
intf = gr.Interface(
|
| 15 |
fn=classify_image,
|
| 16 |
+
inputs=gr.Image(),
|
| 17 |
+
outputs=gr.Label(),
|
| 18 |
+
title="Dog vs Cat Classifier"
|
| 19 |
)
|
| 20 |
|
| 21 |
+
intf.launch(inline=False
|