Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -126,8 +126,9 @@ with app:
|
|
126 |
model_name=gr.Dropdown(label="选择模型", choices=model_options, value="gpt-3.5-turbo")
|
127 |
endpoint=gr.Dropdown(label="选择接口地址", choices=base_url_options, value="https://lmzh.top/v1")
|
128 |
api_key=gr.Textbox(type='password', label='api-key', placeholder='请在此填写您的API Key')
|
129 |
-
|
130 |
-
|
|
|
131 |
with gr.Column():
|
132 |
output_textbox = gr.Textbox(label="显示问题答案", lines=15, max_lines=200, elem_classes="custom-textbox",interactive=True,show_label=True,show_copy_button=True)
|
133 |
message_btn.click(generate_response,inputs=[question,model_name,endpoint,api_key],outputs=output_textbox)
|
|
|
126 |
model_name=gr.Dropdown(label="选择模型", choices=model_options, value="gpt-3.5-turbo")
|
127 |
endpoint=gr.Dropdown(label="选择接口地址", choices=base_url_options, value="https://lmzh.top/v1")
|
128 |
api_key=gr.Textbox(type='password', label='api-key', placeholder='请在此填写您的API Key')
|
129 |
+
with gr.Row(variant='panel'):
|
130 |
+
message_btn = gr.Button("发送", variant="primary", elem_classes="custom-button")
|
131 |
+
clear_btn = gr.Button("清除", variant="primary", elem_classes="custom-button")
|
132 |
with gr.Column():
|
133 |
output_textbox = gr.Textbox(label="显示问题答案", lines=15, max_lines=200, elem_classes="custom-textbox",interactive=True,show_label=True,show_copy_button=True)
|
134 |
message_btn.click(generate_response,inputs=[question,model_name,endpoint,api_key],outputs=output_textbox)
|