Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -73,4 +73,19 @@ demo = gr.Interface(
|
|
73 |
gr.Textbox(value="Please read a simple sentence.", label="System message"), # Message used to generate text
|
74 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"), # Controls max token length for the generated text
|
75 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"), # Temperature control for text generation
|
76 |
-
gr.Slider(minimum=0.1, maximum=1.0, value=0.95
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
gr.Textbox(value="Please read a simple sentence.", label="System message"), # Message used to generate text
|
74 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"), # Controls max token length for the generated text
|
75 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"), # Temperature control for text generation
|
76 |
+
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)") # Top-p control for text generation
|
77 |
+
],
|
78 |
+
outputs=[
|
79 |
+
gr.Textbox(label="Transcription"), # Display transcription of the audio
|
80 |
+
gr.Textbox(label="Pronunciation Feedback"), # Feedback on pronunciation
|
81 |
+
gr.Textbox(label="Generated Text (What You Were Supposed to Read)") # Display the text generated by the API
|
82 |
+
],
|
83 |
+
title="Speech-to-Text with Pronunciation Feedback",
|
84 |
+
description="Record an audio sample and the system will transcribe it, "
|
85 |
+
"compare your transcription to the generated text, and give pronunciation feedback.",
|
86 |
+
live=True # Real-time interaction
|
87 |
+
)
|
88 |
+
|
89 |
+
|
90 |
+
if __name__ == "__main__":
|
91 |
+
demo.launch(enable_queue=True, show_error=True)
|