Spaces:
Runtime error
Runtime error
Ant
commited on
Commit
•
e6299c4
1
Parent(s):
db23165
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,3 @@
|
|
1 |
-
import transformers
|
2 |
import gradio as gr
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
def classify_image(image):
|
7 |
-
inputs = transformers.Image.from_path(image)
|
8 |
-
outputs = model(inputs)
|
9 |
-
return outputs
|
10 |
-
|
11 |
-
gr.Interface(fn=classify_image, inputs=gr.inputs.Image, outputs=gr.outputs.Label(num_top_classes=3), examples=[["leaf1.jpg"]]).load("models/afern24/vit-beans-finetuned").launch()
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
gr.Interface.load("models/afern24/vit-beans-finetuned").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|