Ant commited on
Commit
e6299c4
1 Parent(s): db23165

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -1,11 +1,3 @@
1
- import transformers
2
  import gradio as gr
3
 
4
- model = transformers.VisionModel.from_pretrained("afern24/vit-beans-finetuned")
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()