Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1548,7 +1548,7 @@ def create_chat_demo(title=None, description=None):
|
|
1548 |
],
|
1549 |
show_copy_button=True,
|
1550 |
),
|
1551 |
-
textbox=gr.Textbox(placeholder='Type message', lines=
|
1552 |
submit_btn=gr.Button(value='Submit', variant="primary", scale=0),
|
1553 |
# ! consider preventing the stop button
|
1554 |
# stop_btn=None,
|
@@ -1559,7 +1559,7 @@ def create_chat_demo(title=None, description=None):
|
|
1559 |
gr.Number(value=max_tokens, label='Max generated tokens (increase if want more generation)'),
|
1560 |
gr.Number(value=frequence_penalty, label='Frequency penalty (> 0 encourage new tokens over repeated tokens)'),
|
1561 |
gr.Number(value=presence_penalty, label='Presence penalty (> 0 encourage new tokens, < 0 encourage existing tokens)'),
|
1562 |
-
gr.Textbox(value=sys_prompt, label='System prompt', lines=
|
1563 |
gr.Number(value=0, label='current_time', visible=False),
|
1564 |
# ! Remove the system prompt textbox to avoid jailbreaking
|
1565 |
],
|
@@ -1729,7 +1729,7 @@ def launch_demo():
|
|
1729 |
demo_free_form = create_free_form_generation_demo()
|
1730 |
|
1731 |
demo_chat = create_chat_demo()
|
1732 |
-
demo_chat_rag = create_chat_demo_rag()
|
1733 |
descriptions = model_desc
|
1734 |
if DISPLAY_MODEL_PATH:
|
1735 |
descriptions += f"<br> {path_markdown.format(model_path=model_path)}"
|
|
|
1548 |
],
|
1549 |
show_copy_button=True,
|
1550 |
),
|
1551 |
+
textbox=gr.Textbox(placeholder='Type message', lines=1, max_lines=128, min_width=200),
|
1552 |
submit_btn=gr.Button(value='Submit', variant="primary", scale=0),
|
1553 |
# ! consider preventing the stop button
|
1554 |
# stop_btn=None,
|
|
|
1559 |
gr.Number(value=max_tokens, label='Max generated tokens (increase if want more generation)'),
|
1560 |
gr.Number(value=frequence_penalty, label='Frequency penalty (> 0 encourage new tokens over repeated tokens)'),
|
1561 |
gr.Number(value=presence_penalty, label='Presence penalty (> 0 encourage new tokens, < 0 encourage existing tokens)'),
|
1562 |
+
gr.Textbox(value=sys_prompt, label='System prompt', lines=4, interactive=False),
|
1563 |
gr.Number(value=0, label='current_time', visible=False),
|
1564 |
# ! Remove the system prompt textbox to avoid jailbreaking
|
1565 |
],
|
|
|
1729 |
demo_free_form = create_free_form_generation_demo()
|
1730 |
|
1731 |
demo_chat = create_chat_demo()
|
1732 |
+
demo_chat_rag = create_chat_demo_rag(description=RAG_DESCRIPTION)
|
1733 |
descriptions = model_desc
|
1734 |
if DISPLAY_MODEL_PATH:
|
1735 |
descriptions += f"<br> {path_markdown.format(model_path=model_path)}"
|