pksh commited on
Commit
0d8c4c8
1 Parent(s): fd4c9a4

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -1,7 +1,11 @@
1
  import gradio as gr
2
-
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
-
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
 
 
 
1
  import gradio as gr
2
+ from transformers import pipeline
3
+ pipe = pipeline(task="image-classification",
4
+ # model for 22k-category classification
5
+ model="microsoft/beit-base-patch16-224-pt22k-ft22k")
6
+ gr.Interface.from_pipeline(pipe,
7
+ title="22k Image Classification",
8
+ description="Object Recognition ...",
9
+ examples = ['wonder_cat.jpg',
10
+ 'aki_dog.jpg',],
11
+ ).launch(inbrowser=True)