chansung commited on
Commit
13272b6
1 Parent(s): 4603be3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -10,6 +10,7 @@ from llama2 import gen_text
10
  from styles import MODEL_SELECTION_CSS
11
  from js import GET_LOCAL_STORAGE, UPDATE_LEFT_BTNS_STATE, UPDATE_PLACEHOLDERS
12
  from templates import templates
 
13
 
14
  from pingpong import PingPong
15
  from pingpong.context import CtxLastWindowStrategy
@@ -213,7 +214,7 @@ with gr.Blocks(css=MODEL_SELECTION_CSS, theme='gradio/soft') as demo:
213
  gr.Markdown("#### Global context")
214
  with gr.Accordion("global context will persist during conversation, and it is placed at the top of the prompt", open=True):
215
  global_context = gr.Textbox(
216
- "global context",
217
  lines=5,
218
  max_lines=10,
219
  interactive=True,
@@ -241,11 +242,6 @@ with gr.Blocks(css=MODEL_SELECTION_CSS, theme='gradio/soft') as demo:
241
  gr.Markdown("#### Context managements")
242
  with gr.Row():
243
  ctx_num_lconv = gr.Slider(2, 10, 3, step=1, label="number of recent talks to keep", interactive=True)
244
- ctx_sum_prompt = gr.Textbox(
245
- "summarize our conversations. what have we discussed about so far?",
246
- label="design a prompt to summarize the conversations",
247
- visible=False
248
- )
249
 
250
  instruction_txtbox.submit(
251
  chat_stream,
 
10
  from styles import MODEL_SELECTION_CSS
11
  from js import GET_LOCAL_STORAGE, UPDATE_LEFT_BTNS_STATE, UPDATE_PLACEHOLDERS
12
  from templates import templates
13
+ from constants import DEFAULT_GLOBAL_CTX
14
 
15
  from pingpong import PingPong
16
  from pingpong.context import CtxLastWindowStrategy
 
214
  gr.Markdown("#### Global context")
215
  with gr.Accordion("global context will persist during conversation, and it is placed at the top of the prompt", open=True):
216
  global_context = gr.Textbox(
217
+ DEFAULT_GLOBAL_CTX,
218
  lines=5,
219
  max_lines=10,
220
  interactive=True,
 
242
  gr.Markdown("#### Context managements")
243
  with gr.Row():
244
  ctx_num_lconv = gr.Slider(2, 10, 3, step=1, label="number of recent talks to keep", interactive=True)
 
 
 
 
 
245
 
246
  instruction_txtbox.submit(
247
  chat_stream,