Commit
•
725b112
1
Parent(s):
d6d3be5
Update app.py
Browse files
app.py
CHANGED
@@ -122,10 +122,10 @@ with gr.Blocks(title=title) as demo:
|
|
122 |
|
123 |
with gr.Tab("Chat mode"):
|
124 |
with gr.Row():
|
125 |
-
chatbot = gr.Chatbot()
|
126 |
with gr.Column():
|
|
|
127 |
msg = gr.Textbox(scale=4, show_label=False, placeholder="Enter text and press enter", container=False)
|
128 |
-
clear = gr.
|
129 |
with gr.Column():
|
130 |
token_count_chat = gr.Slider(10, 512, label="Max Tokens", step=10, value=333)
|
131 |
temperature_chat = gr.Slider(0.2, 2.0, label="Temperature", step=0.1, value=1.2)
|
@@ -160,7 +160,6 @@ with gr.Blocks(title=title) as demo:
|
|
160 |
msg.submit(user_msg, [msg, chatbot], [msg, chatbot], queue=False).then(
|
161 |
chat, chatbot, chatbot, api_name="chat"
|
162 |
)
|
163 |
-
clear.click(clear_chat, None, [chatbot], queue=False)
|
164 |
|
165 |
with gr.Tab("Instruct mode"):
|
166 |
gr.Markdown(f"100% RNN RWKV-LM **trained on 100+ natural languages**. Demo limited to ctxlen {ctx_limit}. For best results, <b>keep your prompt short and clear</b>.")
|
|
|
122 |
|
123 |
with gr.Tab("Chat mode"):
|
124 |
with gr.Row():
|
|
|
125 |
with gr.Column():
|
126 |
+
chatbot = gr.Chatbot()
|
127 |
msg = gr.Textbox(scale=4, show_label=False, placeholder="Enter text and press enter", container=False)
|
128 |
+
clear = gr.ClearButton([msg, chatbot])
|
129 |
with gr.Column():
|
130 |
token_count_chat = gr.Slider(10, 512, label="Max Tokens", step=10, value=333)
|
131 |
temperature_chat = gr.Slider(0.2, 2.0, label="Temperature", step=0.1, value=1.2)
|
|
|
160 |
msg.submit(user_msg, [msg, chatbot], [msg, chatbot], queue=False).then(
|
161 |
chat, chatbot, chatbot, api_name="chat"
|
162 |
)
|
|
|
163 |
|
164 |
with gr.Tab("Instruct mode"):
|
165 |
gr.Markdown(f"100% RNN RWKV-LM **trained on 100+ natural languages**. Demo limited to ctxlen {ctx_limit}. For best results, <b>keep your prompt short and clear</b>.")
|