Spaces:
Sleeping
Sleeping
Commit
·
de76599
1
Parent(s):
bbc92b2
Updating file
Browse files
app.py
CHANGED
@@ -34,15 +34,31 @@ def text_to_sentiment(text):
|
|
34 |
demo = gr.Blocks()
|
35 |
|
36 |
'''Making demo'''
|
|
|
|
|
37 |
with demo:
|
38 |
-
gr.Markdown("Demo
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
demo.launch()
|
|
|
34 |
demo = gr.Blocks()
|
35 |
|
36 |
'''Making demo'''
|
37 |
+
demo = gr.Blocks()
|
38 |
+
|
39 |
with demo:
|
40 |
+
gr.Markdown("Second Demo with Blocks")
|
41 |
+
with gr.Tabs():
|
42 |
+
with gr.TabItem("Transcript audio in spanish"):
|
43 |
+
with gr.Row():
|
44 |
+
audio = gr.Audio(source="microphone", type="filepath")
|
45 |
+
transcription = gr.Textbox()
|
46 |
+
button1 = gr.Button("Please transcript")
|
47 |
+
|
48 |
+
with gr.TabItem("Sentiment analisys"):
|
49 |
+
with gr.Row():
|
50 |
+
text = gr.Textbox()
|
51 |
+
label = gr.Label()
|
52 |
+
button2 = gr.Button("Please sentiment")
|
53 |
+
|
54 |
+
with gr.TabItem("Image classify"):
|
55 |
+
with gr.Row():
|
56 |
+
image = gr.Image(shape=(224,224))
|
57 |
+
labelImage = gr.Label(num_top_classes=3)
|
58 |
+
button3 = gr.Button("Please classify Image")
|
59 |
+
|
60 |
+
button1.click(audio_to_text, inputs=audio, outputs=transcription)
|
61 |
+
button2.click(text_to_sentiment, inputs=text, outputs=label)
|
62 |
+
button3.click(classify_image, inputs=image, outputs=labelImage)
|
63 |
|
64 |
demo.launch()
|