Spaces:
Runtime error
Runtime error
Este si :v
Browse files
app.py
CHANGED
@@ -1,20 +1,10 @@
|
|
|
|
1 |
from transformers import pipeline
|
2 |
-
|
3 |
-
trans = pipeline("automatic-speech-recognition",model="facebook/wav2vec2-large-xlsr-53-spanish")
|
4 |
-
clasificador = pipeline('text-classification',model="pysentimiento/robertuito-sentiment-analysis")
|
5 |
|
6 |
-
def transcribe(audio):
|
7 |
-
text = trans(audio)["text"]
|
8 |
-
return text
|
9 |
|
10 |
-
def clasificacion(text):
|
11 |
-
return clasificador(text)[0]["label"]
|
12 |
|
13 |
|
14 |
-
def clasifica_imagen(img):
|
15 |
-
class_img = imagen(img)
|
16 |
-
return class_img
|
17 |
-
|
18 |
demo = gr.Blocks()
|
19 |
with demo:
|
20 |
gr.Markdown("Clasificacion de Audio a Sentimientos")
|
|
|
1 |
+
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
+
from funciones import transcribe, clasificacion, clasifica_imagen
|
|
|
|
|
4 |
|
|
|
|
|
|
|
5 |
|
|
|
|
|
6 |
|
7 |
|
|
|
|
|
|
|
|
|
8 |
demo = gr.Blocks()
|
9 |
with demo:
|
10 |
gr.Markdown("Clasificacion de Audio a Sentimientos")
|