TotalUpbeat commited on
Commit
7f4a322
·
1 Parent(s): 57e0a85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -1,5 +1,11 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- pipe = pipeline(task="image-classification", model="Rajaram1996/FacialEmoRecog")
5
- gr.Interface.from_pipeline(pipe, title="Emotion Recognition using facial expressions", examples = ["Sample_1.jpg", "Sample_2.jpg",], allow_flagging="never").launch(inbrowswer=True)
 
 
 
 
 
 
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ pipe = pipeline(task="image-classification",
5
+ # model that can do 22k-category classification
6
+ model="microsoft/beit-base-patch16-224-pt22k-ft22k")
7
+ gr.Interface.from_pipeline(pipe,
8
+ title="22k Image Classification",
9
+ description="Object Recognition using Microsoft BEIT",
10
+ examples = ['wonder_cat.jpg', 'aki_dog.jpg',],
11
+ allow_flagging="never").launch(inbrowser=True)