Update app.py
Browse files
app.py
CHANGED
|
@@ -6,13 +6,21 @@ current_chat_id = 0
|
|
| 6 |
|
| 7 |
with gr.Blocks() as demo:
|
| 8 |
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
def respond(message, chat_history):
|
| 18 |
# Basic echo response
|
|
|
|
| 6 |
|
| 7 |
with gr.Blocks() as demo:
|
| 8 |
|
| 9 |
+
with gr.Row():
|
| 10 |
+
|
| 11 |
+
# First Column with 20% width
|
| 12 |
+
with gr.Column(width=20):
|
| 13 |
+
display_chat_names = gr.Textbox(placeholder="Chat names", readonly=True, lines=10)
|
| 14 |
+
enter_chat_name = gr.Textbox(placeholder="Enter chat name to load")
|
| 15 |
+
load_button = gr.Button("Load Chat")
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
# Second Column with 80% width
|
| 19 |
+
with gr.Column(width=80):
|
| 20 |
+
chatbot = gr.Chatbot()
|
| 21 |
+
msg = gr.Textbox()
|
| 22 |
+
clear = gr.ClearButton([msg, chatbot])
|
| 23 |
+
save_button = gr.Button("Save Chat")
|
| 24 |
|
| 25 |
def respond(message, chat_history):
|
| 26 |
# Basic echo response
|