Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import os
|
2 |
-
import gradio
|
3 |
from PIL import Image
|
4 |
from timeit import default_timer as timer
|
5 |
from tensorflow import keras
|
@@ -34,14 +34,14 @@ def make_block(dem):
|
|
34 |
with gr.Tabs():
|
35 |
with gr.TabItem("Transcribe audio en español"):
|
36 |
with gr.Row():
|
37 |
-
in_prompt_1 =
|
38 |
-
out_response_1 =
|
39 |
b1 = gr.Button("Voz a Texto")
|
40 |
|
41 |
with gr.TabItem("Análisis de sentimiento en español"):
|
42 |
with gr.Row():
|
43 |
-
in_prompt_2 =
|
44 |
-
out_response_2 =
|
45 |
b2 = gr.Button("Texto a Sentimiento")
|
46 |
b1.click(predict_sentiment, inputs=in_prompt_1, outputs=out_response_1)
|
47 |
b2.click(predict, inputs=in_prompt_2, outputs=out_response_2)
|
|
|
1 |
import os
|
2 |
+
import gradio as gr
|
3 |
from PIL import Image
|
4 |
from timeit import default_timer as timer
|
5 |
from tensorflow import keras
|
|
|
34 |
with gr.Tabs():
|
35 |
with gr.TabItem("Transcribe audio en español"):
|
36 |
with gr.Row():
|
37 |
+
in_prompt_1 = gr.components.Textbox(lines=10, placeholder=None, label='Enter review text')
|
38 |
+
out_response_1 = gr.components.Textbox(type="text", label='Sentiment')
|
39 |
b1 = gr.Button("Voz a Texto")
|
40 |
|
41 |
with gr.TabItem("Análisis de sentimiento en español"):
|
42 |
with gr.Row():
|
43 |
+
in_prompt_2 = gr.components.Textbox(lines=2, label='Enter the Symptoms')
|
44 |
+
out_response_2 = gr.components.Textbox(label='Disease')
|
45 |
b2 = gr.Button("Texto a Sentimiento")
|
46 |
b1.click(predict_sentiment, inputs=in_prompt_1, outputs=out_response_1)
|
47 |
b2.click(predict, inputs=in_prompt_2, outputs=out_response_2)
|