Spaces:
Runtime error
Runtime error
yizhangliu
commited on
Commit
•
64f9c27
1
Parent(s):
bb50470
Update app.py
Browse files
app.py
CHANGED
@@ -116,7 +116,7 @@ with gr.Blocks(title='chat with chatgpt') as demo:
|
|
116 |
chatbot = gr.Chatbot(elem_id="chat_bot", visible=False).style(color_map=("green", "blue"))
|
117 |
chatbot1 = gr.Chatbot(elem_id="chat_bot1").style(color_map=("green", "blue"))
|
118 |
with gr.Row():
|
119 |
-
|
120 |
chat_history = gr.Textbox(lines=4, label="prompt", visible=False)
|
121 |
submit_btn = gr.Button(value = "submit",elem_id="submit-btn").style(
|
122 |
margin=True,
|
@@ -124,7 +124,7 @@ with gr.Blocks(title='chat with chatgpt') as demo:
|
|
124 |
width=100
|
125 |
)
|
126 |
submit_btn.click(fn=chat,
|
127 |
-
inputs=[
|
128 |
outputs=[chatbot, chat_history],
|
129 |
)
|
130 |
|
|
|
116 |
chatbot = gr.Chatbot(elem_id="chat_bot", visible=False).style(color_map=("green", "blue"))
|
117 |
chatbot1 = gr.Chatbot(elem_id="chat_bot1").style(color_map=("green", "blue"))
|
118 |
with gr.Row():
|
119 |
+
prompt_input = gr.Textbox(lines=1, label="prompt",show_label=False)
|
120 |
chat_history = gr.Textbox(lines=4, label="prompt", visible=False)
|
121 |
submit_btn = gr.Button(value = "submit",elem_id="submit-btn").style(
|
122 |
margin=True,
|
|
|
124 |
width=100
|
125 |
)
|
126 |
submit_btn.click(fn=chat,
|
127 |
+
inputs=[prompt_input, chat_history],
|
128 |
outputs=[chatbot, chat_history],
|
129 |
)
|
130 |
|