Spaces:
Runtime error
Runtime error
yizhangliu
commited on
Commit
•
0f9fc84
1
Parent(s):
7b09fec
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def get_response_from_chatbot(text):
|
|
14 |
api.refresh_auth()
|
15 |
api.reset_conversation()
|
16 |
response = resp['message']
|
17 |
-
logger.info(f"response_: {response}")
|
18 |
except:
|
19 |
response = "Sorry, I'm am tired."
|
20 |
return response
|
@@ -107,12 +107,12 @@ with gr.Blocks(title='chat with chatgpt') as demo:
|
|
107 |
with gr.Group(elem_id="page_1", visible=True) as page_1:
|
108 |
with gr.Box():
|
109 |
with gr.Row():
|
110 |
-
start_button = gr.Button("Let's
|
111 |
start_button.click(fn=None, inputs=[], outputs=[], _js=start_work)
|
112 |
|
113 |
with gr.Group(elem_id="page_2", visible=False) as page_2:
|
114 |
with gr.Row(elem_id="prompt_row"):
|
115 |
-
chatbot = gr.Chatbot(elem_id="chat_bot").style(color_map=("green", "blue"))
|
116 |
chatbot1 = gr.Chatbot(elem_id="chat_bot1").style(color_map=("green", "blue"))
|
117 |
with gr.Row():
|
118 |
prompt_input0 = gr.Textbox(lines=1, label="prompt",show_label=False)
|
|
|
14 |
api.refresh_auth()
|
15 |
api.reset_conversation()
|
16 |
response = resp['message']
|
17 |
+
# logger.info(f"response_: {response}")
|
18 |
except:
|
19 |
response = "Sorry, I'm am tired."
|
20 |
return response
|
|
|
107 |
with gr.Group(elem_id="page_1", visible=True) as page_1:
|
108 |
with gr.Box():
|
109 |
with gr.Row():
|
110 |
+
start_button = gr.Button("Let's talk to chatGPT!", elem_id="start-btn", visible=True)
|
111 |
start_button.click(fn=None, inputs=[], outputs=[], _js=start_work)
|
112 |
|
113 |
with gr.Group(elem_id="page_2", visible=False) as page_2:
|
114 |
with gr.Row(elem_id="prompt_row"):
|
115 |
+
chatbot = gr.Chatbot(elem_id="chat_bot", visible=False).style(color_map=("green", "blue"))
|
116 |
chatbot1 = gr.Chatbot(elem_id="chat_bot1").style(color_map=("green", "blue"))
|
117 |
with gr.Row():
|
118 |
prompt_input0 = gr.Textbox(lines=1, label="prompt",show_label=False)
|