Cartof commited on
Commit
c48d468
1 Parent(s): 7399864

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -89,7 +89,7 @@ def reset_state():
89
  def update_system(new_system_prompt):
90
  return {"role": "system", "content": new_system_prompt}
91
 
92
- title = """<h1 align="center">WoWHuse ChatBot</h1>"""
93
  description = """<div align=center>
94
 
95
  Will not describe your needs to ChatGPT?You Use [ChatGPT Shortcut](https://newzone.top/chatgpt/)
@@ -114,8 +114,8 @@ with gr.Blocks() as demo:
114
  delLastBtn = gr.Button("🗑️ Delete conversation")
115
  reduceTokenBtn = gr.Button("♻️ Optimize Tokens")
116
 
117
- newSystemPrompt = gr.Textbox(show_label=True, placeholder=f"Setting System Prompt...", label="Change System prompt").style(container=True)
118
- systemPromptDisplay = gr.Textbox(show_label=True, value=initial_prompt, interactive=False, label="Current System prompt").style(container=True)
119
 
120
  gr.Markdown(description)
121
 
@@ -124,9 +124,9 @@ with gr.Blocks() as demo:
124
  submitBtn.click(predict, [chatbot, txt, systemPrompt, context], [chatbot, context], show_progress=True)
125
  submitBtn.click(lambda :"", None, txt)
126
  emptyBtn.click(reset_state, outputs=[chatbot, context])
127
- newSystemPrompt.submit(update_system, newSystemPrompt, systemPrompt)
128
- newSystemPrompt.submit(lambda x: x, newSystemPrompt, systemPromptDisplay)
129
- newSystemPrompt.submit(lambda :"", None, newSystemPrompt)
130
  retryBtn.click(retry, [chatbot, systemPrompt, context], [chatbot, context], show_progress=True)
131
  delLastBtn.click(delete_last_conversation, [chatbot, context], [chatbot, context], show_progress=True)
132
  reduceTokenBtn.click(reduce_token, [chatbot, systemPrompt, context], [chatbot, context], show_progress=True)
 
89
  def update_system(new_system_prompt):
90
  return {"role": "system", "content": new_system_prompt}
91
 
92
+ title = """<h1 align="center">Tu întrebi si eu răspund</h1>"""
93
  description = """<div align=center>
94
 
95
  Will not describe your needs to ChatGPT?You Use [ChatGPT Shortcut](https://newzone.top/chatgpt/)
 
114
  delLastBtn = gr.Button("🗑️ Delete conversation")
115
  reduceTokenBtn = gr.Button("♻️ Optimize Tokens")
116
 
117
+ #newSystemPrompt = gr.Textbox(show_label=True, placeholder=f"Setting System Prompt...", label="Change System prompt").style(container=True)
118
+ #systemPromptDisplay = gr.Textbox(show_label=True, value=initial_prompt, interactive=False, label="Current System prompt").style(container=True)
119
 
120
  gr.Markdown(description)
121
 
 
124
  submitBtn.click(predict, [chatbot, txt, systemPrompt, context], [chatbot, context], show_progress=True)
125
  submitBtn.click(lambda :"", None, txt)
126
  emptyBtn.click(reset_state, outputs=[chatbot, context])
127
+ #newSystemPrompt.submit(update_system, newSystemPrompt, systemPrompt)
128
+ #newSystemPrompt.submit(lambda x: x, newSystemPrompt, systemPromptDisplay)
129
+ #newSystemPrompt.submit(lambda :"", None, newSystemPrompt)
130
  retryBtn.click(retry, [chatbot, systemPrompt, context], [chatbot, context], show_progress=True)
131
  delLastBtn.click(delete_last_conversation, [chatbot, context], [chatbot, context], show_progress=True)
132
  reduceTokenBtn.click(reduce_token, [chatbot, systemPrompt, context], [chatbot, context], show_progress=True)