Spaces:
Sleeping
Sleeping
Update app.py
Browse filesChanged the demo,launch method and fixed the grAudio error
app.py
CHANGED
|
@@ -81,11 +81,17 @@ with gr.Blocks(title="Voice Mood Detector", theme=gr.themes.Soft()) as demo:
|
|
| 81 |
|
| 82 |
with gr.Row():
|
| 83 |
with gr.Column():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
audio_input = gr.Audio(
|
| 85 |
sources=["microphone", "upload"],
|
| 86 |
type="numpy",
|
| 87 |
-
label="Speak or Upload Audio"
|
| 88 |
-
waveform_options
|
| 89 |
)
|
| 90 |
btn = gr.Button("Analyze Mood 🎯", variant="primary")
|
| 91 |
|
|
@@ -123,4 +129,4 @@ with gr.Blocks(title="Voice Mood Detector", theme=gr.themes.Soft()) as demo:
|
|
| 123 |
|
| 124 |
# Launch the app
|
| 125 |
if __name__ == "__main__":
|
| 126 |
-
demo.launch(
|
|
|
|
| 81 |
|
| 82 |
with gr.Row():
|
| 83 |
with gr.Column():
|
| 84 |
+
# audio_input = gr.Audio(
|
| 85 |
+
# sources=["microphone", "upload"],
|
| 86 |
+
# type="numpy",
|
| 87 |
+
# label="Speak or Upload Audio",
|
| 88 |
+
# waveform_options={"show_controls": True}
|
| 89 |
+
# )
|
| 90 |
audio_input = gr.Audio(
|
| 91 |
sources=["microphone", "upload"],
|
| 92 |
type="numpy",
|
| 93 |
+
label="Speak or Upload Audio"
|
| 94 |
+
# The 'waveform_options' parameter has been removed entirely.
|
| 95 |
)
|
| 96 |
btn = gr.Button("Analyze Mood 🎯", variant="primary")
|
| 97 |
|
|
|
|
| 129 |
|
| 130 |
# Launch the app
|
| 131 |
if __name__ == "__main__":
|
| 132 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|