Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,10 +67,10 @@ with gr.Blocks() as page:
|
|
| 67 |
with gr.Column(scale=0.6):
|
| 68 |
ui_stts_key = gr.Textbox(placeholder="Please enter your speech service API key if you want to try VoiceChat. " +
|
| 69 |
"Please input these settings and hit 'Enter' key.",
|
| 70 |
-
label="
|
| 71 |
with gr.Column(scale=0.4):
|
| 72 |
ui_stts_loc = gr.Textbox(placeholder="Please enter your speech service region.",
|
| 73 |
-
label="
|
| 74 |
ui_aoai_url.submit(get_aoai_set, [ui_aoai_url, ui_aoai_key, ui_aoai_api], [ui_aoai_url, ui_aoai_key, ui_aoai_api])
|
| 75 |
ui_aoai_key.submit(get_aoai_set, [ui_aoai_url, ui_aoai_key, ui_aoai_api], [ui_aoai_url, ui_aoai_key, ui_aoai_api])
|
| 76 |
ui_aoai_api.submit(get_aoai_set, [ui_aoai_url, ui_aoai_key, ui_aoai_api], [ui_aoai_url, ui_aoai_key, ui_aoai_api])
|
|
@@ -160,10 +160,10 @@ with gr.Blocks() as page:
|
|
| 160 |
with gr.Accordion("Expand to config parameters:", open=True):
|
| 161 |
gr.HTML("ChatGPT use ChatCompletion(). Here is the default system prompt, you can change it to your own prompt.")
|
| 162 |
ui_prompt_sys = gr.Textbox(value="You are an AI assistant that helps people find information.",
|
| 163 |
-
label="Here is the default system prompt, you can change it to your own prompt.",
|
| 164 |
interactive=True).style(container=False)
|
| 165 |
ui_model_chat = gr.Textbox(placeholder="Azure OpenAI model deployment name. ",
|
| 166 |
-
label="
|
| 167 |
with gr.Row():
|
| 168 |
ui_temp_chat = gr.Slider(0.1, 1.0, 0.7, step=0.1, label="Temperature", interactive=True)
|
| 169 |
ui_max_tokens_chat = gr.Slider(100, 8000, 2000, step=100, label="Max Tokens", interactive=True)
|
|
@@ -275,7 +275,7 @@ with gr.Blocks() as page:
|
|
| 275 |
with gr.Column():
|
| 276 |
with gr.Accordion("Expand to config parameters:", open=True):
|
| 277 |
ui_prompt_sys_vchat = gr.Textbox(value="You are an AI assistant that helps people find information and just respond with SSML.",
|
| 278 |
-
label="Here is the default system prompt, you can change it to your own prompt.",
|
| 279 |
interactive=True).style(container=False)
|
| 280 |
ui_model_vchat = gr.Textbox(placeholder="- Azure OpenAI model deployment name. ",
|
| 281 |
label="- Azure OpenAI GPT-3.5/4 deployment name:", lines=1).style(container=False)
|
|
|
|
| 67 |
with gr.Column(scale=0.6):
|
| 68 |
ui_stts_key = gr.Textbox(placeholder="Please enter your speech service API key if you want to try VoiceChat. " +
|
| 69 |
"Please input these settings and hit 'Enter' key.",
|
| 70 |
+
label="- Azure Cognitive Speech service API Key: ", interactive=True, type='password').style(container=False)
|
| 71 |
with gr.Column(scale=0.4):
|
| 72 |
ui_stts_loc = gr.Textbox(placeholder="Please enter your speech service region.",
|
| 73 |
+
label="- Azure Cognitive Speech service region: ", interactive=True).style(container=False)
|
| 74 |
ui_aoai_url.submit(get_aoai_set, [ui_aoai_url, ui_aoai_key, ui_aoai_api], [ui_aoai_url, ui_aoai_key, ui_aoai_api])
|
| 75 |
ui_aoai_key.submit(get_aoai_set, [ui_aoai_url, ui_aoai_key, ui_aoai_api], [ui_aoai_url, ui_aoai_key, ui_aoai_api])
|
| 76 |
ui_aoai_api.submit(get_aoai_set, [ui_aoai_url, ui_aoai_key, ui_aoai_api], [ui_aoai_url, ui_aoai_key, ui_aoai_api])
|
|
|
|
| 160 |
with gr.Accordion("Expand to config parameters:", open=True):
|
| 161 |
gr.HTML("ChatGPT use ChatCompletion(). Here is the default system prompt, you can change it to your own prompt.")
|
| 162 |
ui_prompt_sys = gr.Textbox(value="You are an AI assistant that helps people find information.",
|
| 163 |
+
label="- Here is the default system prompt, you can change it to your own prompt.",
|
| 164 |
interactive=True).style(container=False)
|
| 165 |
ui_model_chat = gr.Textbox(placeholder="Azure OpenAI model deployment name. ",
|
| 166 |
+
label="- Azure OpenAI GPT-3.5/4 deployment name:", lines=1).style(container=False)
|
| 167 |
with gr.Row():
|
| 168 |
ui_temp_chat = gr.Slider(0.1, 1.0, 0.7, step=0.1, label="Temperature", interactive=True)
|
| 169 |
ui_max_tokens_chat = gr.Slider(100, 8000, 2000, step=100, label="Max Tokens", interactive=True)
|
|
|
|
| 275 |
with gr.Column():
|
| 276 |
with gr.Accordion("Expand to config parameters:", open=True):
|
| 277 |
ui_prompt_sys_vchat = gr.Textbox(value="You are an AI assistant that helps people find information and just respond with SSML.",
|
| 278 |
+
label="- Here is the default system prompt, you can change it to your own prompt.",
|
| 279 |
interactive=True).style(container=False)
|
| 280 |
ui_model_vchat = gr.Textbox(placeholder="- Azure OpenAI model deployment name. ",
|
| 281 |
label="- Azure OpenAI GPT-3.5/4 deployment name:", lines=1).style(container=False)
|