Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -77,10 +77,9 @@ def inference(audio, prompt, model, temperature, latest):
|
|
77 |
infers = list(map(lambda x: x.replace("\n", ""), temp))
|
78 |
#infered = list(map(lambda x: x.split(','), infers))
|
79 |
convoState = latest
|
80 |
-
options = options.join(infers)
|
81 |
|
82 |
|
83 |
-
return transcript,
|
84 |
|
85 |
# get audio from microphone
|
86 |
with gr.Blocks() as face:
|
@@ -95,8 +94,8 @@ with gr.Blocks() as face:
|
|
95 |
transcribe_btn = gr.Button(value="Transcribe")
|
96 |
with gr.Column():
|
97 |
script = gr.Textbox(label="Transcribed text")
|
98 |
-
|
99 |
-
options = gr.Radio(choices=["One", "Two", "Three", "Four", "Five"])
|
100 |
latestConvo = gr.Textbox(label="Running conversation")
|
101 |
#transcribe_btn.click(inference)
|
102 |
transcribe_btn.click(fn=inference, inputs=[audio, promptText, dropChoice, sliderChoice, convoState], outputs=[script, options, latestConvo])
|
|
|
77 |
infers = list(map(lambda x: x.replace("\n", ""), temp))
|
78 |
#infered = list(map(lambda x: x.split(','), infers))
|
79 |
convoState = latest
|
|
|
80 |
|
81 |
|
82 |
+
return transcript, infers, convoState
|
83 |
|
84 |
# get audio from microphone
|
85 |
with gr.Blocks() as face:
|
|
|
94 |
transcribe_btn = gr.Button(value="Transcribe")
|
95 |
with gr.Column():
|
96 |
script = gr.Textbox(label="Transcribed text")
|
97 |
+
options = gr.Textbox(label="Predictions")
|
98 |
+
#options = gr.Radio(choices=["One", "Two", "Three", "Four", "Five"])
|
99 |
latestConvo = gr.Textbox(label="Running conversation")
|
100 |
#transcribe_btn.click(inference)
|
101 |
transcribe_btn.click(fn=inference, inputs=[audio, promptText, dropChoice, sliderChoice, convoState], outputs=[script, options, latestConvo])
|