reshinthadith
commited on
Commit
·
e9f9901
1
Parent(s):
97ab9dd
Update app.py
Browse files
app.py
CHANGED
@@ -78,11 +78,7 @@ def bot(history, curr_system_message):
|
|
78 |
return history
|
79 |
|
80 |
|
81 |
-
def system_update(msg):
|
82 |
-
global curr_system_message
|
83 |
-
curr_system_message = msg
|
84 |
|
85 |
-
updated_system_message = ""
|
86 |
|
87 |
with gr.Blocks() as demo:
|
88 |
num = gr.State(value=0)
|
@@ -97,8 +93,6 @@ with gr.Blocks() as demo:
|
|
97 |
msg.submit(user, [msg, chatbot], [msg, chatbot], queue=True).then(
|
98 |
bot, [chatbot, system_msg], chatbot
|
99 |
)
|
100 |
-
system_update(system_msg)
|
101 |
-
system_msg.change(system_update, system_msg, None, queue=True)
|
102 |
clear.click(lambda: None, None, chatbot, queue=True)
|
103 |
demo.queue(concurrency_count=5)
|
104 |
demo.launch()
|
|
|
78 |
return history
|
79 |
|
80 |
|
|
|
|
|
|
|
81 |
|
|
|
82 |
|
83 |
with gr.Blocks() as demo:
|
84 |
num = gr.State(value=0)
|
|
|
93 |
msg.submit(user, [msg, chatbot], [msg, chatbot], queue=True).then(
|
94 |
bot, [chatbot, system_msg], chatbot
|
95 |
)
|
|
|
|
|
96 |
clear.click(lambda: None, None, chatbot, queue=True)
|
97 |
demo.queue(concurrency_count=5)
|
98 |
demo.launch()
|