rodragon737 commited on
Commit
ae753fc
β€’
1 Parent(s): d2eab53

Add application file

Browse files
Files changed (2) hide show
  1. README.md +8 -1
  2. app.py +9 -16
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Ocr Reader Space
3
  emoji: πŸ“š
4
  colorFrom: pink
5
  colorTo: red
@@ -9,5 +9,12 @@ app_file: app.py
9
  pinned: false
10
  license: mit
11
  ---
 
 
 
 
 
 
 
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: Sen
3
  emoji: πŸ“š
4
  colorFrom: pink
5
  colorTo: red
 
9
  pinned: false
10
  license: mit
11
  ---
12
+ %%capture
13
+ ##para no ver consola de instalacion#
14
+ !pip install gradio
15
+ !pip install transformers
16
+ !pip install torch
17
+ !pip install xformers
18
+ !pip install ffmpeg
19
 
20
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -14,21 +14,14 @@ def texto_a_sentimiento(text):
14
  demo = gr.Blocks()
15
 
16
  with demo:
17
- gr.Markdown("Demo Sentimientos y Tabs")
18
- with gr.Tabs():
19
- with gr.TabItem("escribiendo en EspaΓ±ol"):
20
- with gr.Row():
21
- audio = gr.Audio(source="microphone", type="filepath")
22
- escrito = gr.Textbox()
23
- b1 = gr.Button("Escribe lo hablado")
24
 
25
- with gr.TabItem("Grado de Satisfaccion"):
26
- with gr.Row():
27
- texto=gr.Textbox()
28
- label=gr.Label()
29
- b2=gr.Button("ΒΏComo se Sintio?")
30
 
31
- b1.click(audio_a_text, inputs=audio, outputs=escrito)
32
- b2.click(texto_a_sentimiento, inputs=texto, outputs=label)
33
-
34
- demo.launch()
 
14
  demo = gr.Blocks()
15
 
16
  with demo:
17
+ gr.Markdown("demo de sentimientos leidos")
18
+ audio = gr.Audio(source="microphone", type="filepath")
19
+ texto = gr.Textbox()
20
+ b1 = gr.Button("transcribir")
21
+ b1.click(audio_a_text, inputs=audio, outputs=texto)
 
 
22
 
23
+ label = gr.Label()
24
+ b2 = gr.Button("ΒΏGusto?")
25
+ b2.click(texto_a_sentimiento, inputs=texto, outputs=label)
 
 
26
 
27
+ demo.launch(share=True)