Spaces:
Runtime error
Runtime error
Commit
·
32b6255
1
Parent(s):
d1c58df
Update app.py to work
Browse files
app.py
CHANGED
@@ -1,13 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
model = AutoModelForImageClassification.from_pretrained("Rajaram1996/FacialEmoRecog")
|
8 |
-
|
9 |
-
def greet(name):
|
10 |
-
return "Hello " + name + "!!"
|
11 |
-
|
12 |
-
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
13 |
-
iface.launch()
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|