Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
# Use a pipeline as a high-level helper
|
3 |
+
from transformers import pipeline
|
4 |
+
|
5 |
+
pipe = pipeline("image-classification", model="wasmdashai/vit-face-expression-v1")
|
6 |
+
def greet(image):
|
7 |
+
out=pipe(image)
|
8 |
+
return str(out)
|
9 |
+
|
10 |
+
demo = gr.Interface(fn=greet, inputs="image", outputs="text")
|
11 |
+
demo.launch()
|