File size: 792 Bytes
d1c58df
32b6255
cdc5cee
 
 
 
 
d1c58df
7f4a322
 
6bfbecf
7f4a322
 
 
f129a50
7f4a322
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr
from transformers import pipeline
from transformers import AutoFeatureExtractor, AutoModelForImageClassification

extractor = AutoFeatureExtractor.from_pretrained("Rajaram1996/FacialEmoRecog")

model_heh = AutoModelForImageClassification.from_pretrained("Rajaram1996/FacialEmoRecog")

pipe = pipeline(task="image-classification", 
                 # model that can do 22k-category classification
                 model="Rajaram1996/FacialEmoRecog")
gr.Interface.from_pipeline(pipe, 
                           title="22k Image Classification",
                           description="Object Recognition using Microsoft BEIT",
                           examples = ['Sample_1.jpg', 'Sample_2.jpg',],
                           allow_flagging="never").launch(inbrowser=True)