Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -167,6 +167,11 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
|
|
167 |
top_p = gr.Slider( minimum=-0, maximum=1.0, value=1.0, step=0.05, interactive=True, label="Top-p (nucleus sampling)",)
|
168 |
temperature = gr.Slider( minimum=-0, maximum=5.0, value=1.0, step=0.1, interactive=True, label="Temperature",)
|
169 |
chat_counter = gr.Number(value=0, visible=False, precision=0)
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
# Example modification for the input submission handler
|
172 |
inputs.submit(handle_file, inputs=[file_upload, openai_gpt4_key, system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], outputs=[chatbot, state, chat_counter, server_status_code])
|
@@ -177,11 +182,7 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
|
|
177 |
# b1.click(handle_file, [file_upload, openai_gpt4_key, system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code])
|
178 |
b1.click(handle_file, inputs=[file_upload, openai_gpt4_key, system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], outputs=[chatbot, state, chat_counter, server_status_code])
|
179 |
|
180 |
-
|
181 |
-
with gr.Column(scale=7):
|
182 |
-
b1 = gr.Button().style(full_width=True)
|
183 |
-
with gr.Column(scale=3):
|
184 |
-
server_status_code = gr.Textbox(label="Status code from OpenAI server", )
|
185 |
|
186 |
#top_p, temperature
|
187 |
with gr.Accordion("Parameters", open=False):
|
|
|
167 |
top_p = gr.Slider( minimum=-0, maximum=1.0, value=1.0, step=0.05, interactive=True, label="Top-p (nucleus sampling)",)
|
168 |
temperature = gr.Slider( minimum=-0, maximum=5.0, value=1.0, step=0.1, interactive=True, label="Temperature",)
|
169 |
chat_counter = gr.Number(value=0, visible=False, precision=0)
|
170 |
+
with gr.Row():
|
171 |
+
with gr.Column(scale=7):
|
172 |
+
b1 = gr.Button().style(full_width=True)
|
173 |
+
with gr.Column(scale=3):
|
174 |
+
server_status_code = gr.Textbox(label="Status code from OpenAI server", )
|
175 |
|
176 |
# Example modification for the input submission handler
|
177 |
inputs.submit(handle_file, inputs=[file_upload, openai_gpt4_key, system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], outputs=[chatbot, state, chat_counter, server_status_code])
|
|
|
182 |
# b1.click(handle_file, [file_upload, openai_gpt4_key, system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code])
|
183 |
b1.click(handle_file, inputs=[file_upload, openai_gpt4_key, system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], outputs=[chatbot, state, chat_counter, server_status_code])
|
184 |
|
185 |
+
|
|
|
|
|
|
|
|
|
186 |
|
187 |
#top_p, temperature
|
188 |
with gr.Accordion("Parameters", open=False):
|