Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
|
|
4 |
|
5 |
pipe = pipeline("image-classification",
|
6 |
model="dima806/facial_emotions_image_detection")
|
7 |
-
|
8 |
def launch(input):
|
9 |
etiquetas_espanol = {'happy': 'felicidad', 'neutral': 'neutral',
|
10 |
'surprise': 'sorpresa', 'sad': 'tristeza',
|
@@ -41,6 +41,8 @@ Suban una foto que incluya rostros humanos bien visibles y sorpréndase (o no) c
|
|
41 |
iface = gr.Interface(launch,
|
42 |
inputs=gr.Image(type='pil'),
|
43 |
outputs="text",
|
|
|
|
|
44 |
title=titulo, description=descripcion)
|
45 |
|
46 |
iface.launch(show_api=False)
|
|
|
4 |
|
5 |
pipe = pipeline("image-classification",
|
6 |
model="dima806/facial_emotions_image_detection")
|
7 |
+
|
8 |
def launch(input):
|
9 |
etiquetas_espanol = {'happy': 'felicidad', 'neutral': 'neutral',
|
10 |
'surprise': 'sorpresa', 'sad': 'tristeza',
|
|
|
41 |
iface = gr.Interface(launch,
|
42 |
inputs=gr.Image(type='pil'),
|
43 |
outputs="text",
|
44 |
+
submit_btn="Analizar",
|
45 |
+
clear_btn="Limpiar",
|
46 |
title=titulo, description=descripcion)
|
47 |
|
48 |
iface.launch(show_api=False)
|