Ifeanyi commited on
Commit
89d54d0
·
1 Parent(s): 22c942e

new update

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -2,12 +2,5 @@ from transformers import pipeline
2
  import gradio as gr
3
  import timm
4
 
5
- def image_classifier(image):
6
- model = pipeline("image-classification")
7
- return model(image)
8
-
9
- gr.Interface(image_classifier,
10
- inputs = gr.inputs.Image(label = "Upload Image",type = "filepath"),
11
- outputs = ["classification"],
12
- theme = "dark",
13
- title = "Image classifier").launch(share = True)
 
2
  import gradio as gr
3
  import timm
4
 
5
+ image_classifier = pipeline("image-classification")
6
+ gr.Interface.from_pipeline(image_classifier).launch(share = True)