Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ with gr.Blocks() as demo:
|
|
114 |
emptyBtn = gr.Button("🧹 New conversation")
|
115 |
retryBtn = gr.Button("🔄 Resubmit")
|
116 |
delLastBtn = gr.Button("🗑️ Delete conversation")
|
117 |
-
reduceTokenBtn = gr.Button("♻️ Optimize Tokens")
|
118 |
|
119 |
#newSystemPrompt = gr.Textbox(show_label=True, placeholder=f"Setting System Prompt...", label="Change System prompt").style(container=True)
|
120 |
#systemPromptDisplay = gr.Textbox(show_label=True, value=initial_prompt, interactive=False, label="Current System prompt").style(container=True)
|
@@ -125,12 +125,12 @@ with gr.Blocks() as demo:
|
|
125 |
txt.submit(lambda :"", None, txt)
|
126 |
submitBtn.click(predict, [chatbot, txt, systemPrompt, context], [chatbot, context], show_progress=True)
|
127 |
submitBtn.click(lambda :"", None, txt)
|
128 |
-
|
129 |
#newSystemPrompt.submit(update_system, newSystemPrompt, systemPrompt)
|
130 |
#newSystemPrompt.submit(lambda x: x, newSystemPrompt, systemPromptDisplay)
|
131 |
#newSystemPrompt.submit(lambda :"", None, newSystemPrompt)
|
132 |
-
|
133 |
-
|
134 |
#reduceTokenBtn.click(reduce_token, [chatbot, systemPrompt, context], [chatbot, context], show_progress=True)
|
135 |
|
136 |
|
|
|
114 |
emptyBtn = gr.Button("🧹 New conversation")
|
115 |
retryBtn = gr.Button("🔄 Resubmit")
|
116 |
delLastBtn = gr.Button("🗑️ Delete conversation")
|
117 |
+
#reduceTokenBtn = gr.Button("♻️ Optimize Tokens")
|
118 |
|
119 |
#newSystemPrompt = gr.Textbox(show_label=True, placeholder=f"Setting System Prompt...", label="Change System prompt").style(container=True)
|
120 |
#systemPromptDisplay = gr.Textbox(show_label=True, value=initial_prompt, interactive=False, label="Current System prompt").style(container=True)
|
|
|
125 |
txt.submit(lambda :"", None, txt)
|
126 |
submitBtn.click(predict, [chatbot, txt, systemPrompt, context], [chatbot, context], show_progress=True)
|
127 |
submitBtn.click(lambda :"", None, txt)
|
128 |
+
emptyBtn.click(reset_state, outputs=[chatbot, context])
|
129 |
#newSystemPrompt.submit(update_system, newSystemPrompt, systemPrompt)
|
130 |
#newSystemPrompt.submit(lambda x: x, newSystemPrompt, systemPromptDisplay)
|
131 |
#newSystemPrompt.submit(lambda :"", None, newSystemPrompt)
|
132 |
+
retryBtn.click(retry, [chatbot, systemPrompt, context], [chatbot, context], show_progress=True)
|
133 |
+
delLastBtn.click(delete_last_conversation, [chatbot, context], [chatbot, context], show_progress=True)
|
134 |
#reduceTokenBtn.click(reduce_token, [chatbot, systemPrompt, context], [chatbot, context], show_progress=True)
|
135 |
|
136 |
|