Spaces:
Runtime error
Runtime error
conneroisu
commited on
Commit
·
d8415a9
1
Parent(s):
9e0b2ba
third commit
Browse files
app.py
CHANGED
@@ -3,10 +3,7 @@ from PIL import Image, ImageOps
|
|
3 |
import numpy as np
|
4 |
import gradio as gr
|
5 |
|
6 |
-
gr.Interface(fn=predict,
|
7 |
-
inputs=gr.inputs.Image(type="pil"
|
8 |
-
),
|
9 |
-
outputs=gr.outputs.Label(num_top_classes=2),
|
10 |
def greet(name):
|
11 |
return "Hello " + name + "!!"
|
12 |
|
@@ -37,5 +34,5 @@ def predict(img):
|
|
37 |
# run the inference
|
38 |
prediction = model.predict(data)
|
39 |
return prediction
|
40 |
-
iface = gr.Interface(fn=
|
41 |
iface.launch()
|
|
|
3 |
import numpy as np
|
4 |
import gradio as gr
|
5 |
|
6 |
+
gr.Interface(fn=predict, inputs=gr.inputs.Image(type="pil"), outputs=gr.outputs.Label(num_top_classes=2))
|
|
|
|
|
|
|
7 |
def greet(name):
|
8 |
return "Hello " + name + "!!"
|
9 |
|
|
|
34 |
# run the inference
|
35 |
prediction = model.predict(data)
|
36 |
return prediction
|
37 |
+
iface = gr.Interface(fn=predict, inputs=gr.inputs.Image(type="pil"), outputs=gr.outputs.Label(num_top_classes=2))
|
38 |
iface.launch()
|