JustinLin610
commited on
Commit
•
0b5789f
1
Parent(s):
1a85b1f
Update app.py
Browse files
app.py
CHANGED
@@ -68,20 +68,20 @@ def model_chat(query: Optional[str], history: Optional[History], system: str
|
|
68 |
|
69 |
|
70 |
with gr.Blocks() as demo:
|
71 |
-
gr.Markdown("""<center><font size=8>
|
72 |
|
73 |
with gr.Row():
|
74 |
with gr.Column(scale=3):
|
75 |
system_input = gr.Textbox(value=default_system, lines=1, label='System')
|
76 |
with gr.Column(scale=1):
|
77 |
-
modify_system = gr.Button("🛠️
|
78 |
system_state = gr.Textbox(value=default_system, visible=False)
|
79 |
chatbot = gr.Chatbot(label='codeqwen1.5-7b-chat')
|
80 |
textbox = gr.Textbox(lines=2, label='Input')
|
81 |
|
82 |
with gr.Row():
|
83 |
-
clear_history = gr.Button("🧹
|
84 |
-
sumbit = gr.Button("🚀
|
85 |
|
86 |
sumbit.click(model_chat,
|
87 |
inputs=[textbox, chatbot, system_state],
|
|
|
68 |
|
69 |
|
70 |
with gr.Blocks() as demo:
|
71 |
+
gr.Markdown("""<center><font size=8>CodeQwen1.5-7B-Chat Bot👾</center>""")
|
72 |
|
73 |
with gr.Row():
|
74 |
with gr.Column(scale=3):
|
75 |
system_input = gr.Textbox(value=default_system, lines=1, label='System')
|
76 |
with gr.Column(scale=1):
|
77 |
+
modify_system = gr.Button("🛠️ Set system prompt and clear history", scale=2)
|
78 |
system_state = gr.Textbox(value=default_system, visible=False)
|
79 |
chatbot = gr.Chatbot(label='codeqwen1.5-7b-chat')
|
80 |
textbox = gr.Textbox(lines=2, label='Input')
|
81 |
|
82 |
with gr.Row():
|
83 |
+
clear_history = gr.Button("🧹 Clear History")
|
84 |
+
sumbit = gr.Button("🚀 Send")
|
85 |
|
86 |
sumbit.click(model_chat,
|
87 |
inputs=[textbox, chatbot, system_state],
|