Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,7 @@ def inference(audio, prompt, model, temperature, latest):
|
|
79 |
|
80 |
# get audio from microphone
|
81 |
with gr.Blocks() as face:
|
82 |
-
convoState = gr.State([])
|
83 |
with gr.Row():
|
84 |
with gr.Column():
|
85 |
audio = gr.Audio(source="microphone", type="filepath")
|
@@ -88,9 +88,9 @@ with gr.Blocks() as face:
|
|
88 |
sliderChoice = gr.Slider(minimum=0.0, maximum=1.0, default=0.8, step=0.1, label="Temperature")
|
89 |
transcribe_btn = gr.Button(value="Transcribe")
|
90 |
with gr.Column():
|
91 |
-
script = gr.Textbox(label="text
|
92 |
-
options = gr.Textbox(label="
|
93 |
-
latestConvo = gr.Textbox()
|
94 |
#transcribe_btn.click(inference)
|
95 |
transcribe_btn.click(fn=inference, inputs=[audio, promptText, dropChoice, sliderChoice, convoState], outputs=[script, options, latestConvo])
|
96 |
examples = gr.Examples(examples=["Sedan, Truck, SUV", "Dalmaion, Shepherd, Lab, Mutt"], inputs=[options])
|
|
|
79 |
|
80 |
# get audio from microphone
|
81 |
with gr.Blocks() as face:
|
82 |
+
convoState = gr.State([""])
|
83 |
with gr.Row():
|
84 |
with gr.Column():
|
85 |
audio = gr.Audio(source="microphone", type="filepath")
|
|
|
88 |
sliderChoice = gr.Slider(minimum=0.0, maximum=1.0, default=0.8, step=0.1, label="Temperature")
|
89 |
transcribe_btn = gr.Button(value="Transcribe")
|
90 |
with gr.Column():
|
91 |
+
script = gr.Textbox(label="Transcribed text")
|
92 |
+
options = gr.Textbox(label="Predictions")
|
93 |
+
latestConvo = gr.Textbox(label="Running conversation")
|
94 |
#transcribe_btn.click(inference)
|
95 |
transcribe_btn.click(fn=inference, inputs=[audio, promptText, dropChoice, sliderChoice, convoState], outputs=[script, options, latestConvo])
|
96 |
examples = gr.Examples(examples=["Sedan, Truck, SUV", "Dalmaion, Shepherd, Lab, Mutt"], inputs=[options])
|