Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -77,17 +77,17 @@ def inference(audio, prompt, model, temperature):
|
|
77 |
# get audio from microphone
|
78 |
with gr.Blocks() as face:
|
79 |
with gr.Row():
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
|
93 |
face.launch()
|
|
|
77 |
# get audio from microphone
|
78 |
with gr.Blocks() as face:
|
79 |
with gr.Row():
|
80 |
+
with gr.Column():
|
81 |
+
audio = gr.Audio(source="microphone", type="filepath")
|
82 |
+
promptText = gr.inputs.Textbox(lines=15, placeholder="Enter a prompt here"),
|
83 |
+
dropChoice = gr.inputs.Dropdown(["text-ada-001", "text-davinci-002", "text-davinci-003", "gpt-3.5-turbo"], label="Model"),
|
84 |
+
sliderChoice = gr.inputs.Slider(minimum=0.0, maximum=1.0, default=0.8, step=0.1, label="Temperature")
|
85 |
+
transcribe_btn = gr.Button(value="Transcribe")
|
86 |
+
with gr.Column():
|
87 |
+
script = gr.Textbox(label="text...")
|
88 |
+
options = gr.Textbox(label="predictions...")
|
89 |
+
transcribe_btn.click(inference)
|
90 |
+
#transcribe_btn.click(inference, inputs=[audio, promptText, dropChoice, sliderChoice], outputs=[script, options])
|
91 |
+
#examples = gr.Examples(examples=["Sedan, Truck, SUV", "Dalmaion, Shepherd, Lab, Mutt"])
|
92 |
|
93 |
face.launch()
|