Spaces:
Running
Running
SnJForever
commited on
Commit
•
be4b602
1
Parent(s):
b6c498d
update
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import uuid
|
|
6 |
import whisper
|
7 |
import azure.cognitiveservices.speech as speechsdk
|
8 |
import base64
|
9 |
-
|
10 |
|
11 |
from polly_utils import PollyVoiceData, NEURAL_ENGINE
|
12 |
from azure_utils import AzureVoiceData
|
@@ -323,11 +323,11 @@ with gr.Blocks(css=css) as demo:
|
|
323 |
max_tokens = gr.Slider(minimum=100, maximum=4096, value=1000, step=1, label="Max tokens per response")
|
324 |
context_length = gr.Slider(minimum=1, maximum=10, value=2, step=1, label="Context length", info="Number of previous messages to send to the chatbot. Be careful with high values, it can blow up the token budget quickly.")
|
325 |
with gr.Row():
|
326 |
-
with gr.Column(
|
327 |
type_select = gr.Dropdown(show_label=False, choices= ["TEXT", "IMAGE"],value="TEXT",interactive=True)
|
328 |
-
with gr.Column(scale=
|
329 |
input_message = gr.Textbox(show_label=False, placeholder="Enter text and press enter", visible=True).style(container=False)
|
330 |
-
with gr.Column(scale=
|
331 |
btn_submit = gr.Button("Submit")
|
332 |
total_tokens_str = gr.Markdown(elem_id="total_tokens_str")
|
333 |
with gr.Row():
|
|
|
6 |
import whisper
|
7 |
import azure.cognitiveservices.speech as speechsdk
|
8 |
import base64
|
9 |
+
import os
|
10 |
|
11 |
from polly_utils import PollyVoiceData, NEURAL_ENGINE
|
12 |
from azure_utils import AzureVoiceData
|
|
|
323 |
max_tokens = gr.Slider(minimum=100, maximum=4096, value=1000, step=1, label="Max tokens per response")
|
324 |
context_length = gr.Slider(minimum=1, maximum=10, value=2, step=1, label="Context length", info="Number of previous messages to send to the chatbot. Be careful with high values, it can blow up the token budget quickly.")
|
325 |
with gr.Row():
|
326 |
+
with gr.Column(min_width=TALKING_HEAD_WIDTH, visible=True):
|
327 |
type_select = gr.Dropdown(show_label=False, choices= ["TEXT", "IMAGE"],value="TEXT",interactive=True)
|
328 |
+
with gr.Column(scale=6):
|
329 |
input_message = gr.Textbox(show_label=False, placeholder="Enter text and press enter", visible=True).style(container=False)
|
330 |
+
with gr.Column(scale=3):
|
331 |
btn_submit = gr.Button("Submit")
|
332 |
total_tokens_str = gr.Markdown(elem_id="total_tokens_str")
|
333 |
with gr.Row():
|