Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def stream_chat(
|
|
52 |
history: list,
|
53 |
system_prompt: str,
|
54 |
temperature: float = 0.8,
|
55 |
-
max_new_tokens: int =
|
56 |
top_p: float = 1.0,
|
57 |
top_k: int = 20,
|
58 |
penalty: float = 1.2,
|
@@ -83,7 +83,7 @@ def stream_chat(
|
|
83 |
top_k = top_k,
|
84 |
temperature = temperature,
|
85 |
repetition_penalty=penalty,
|
86 |
-
eos_token_id=
|
87 |
streamer=streamer,
|
88 |
)
|
89 |
|
@@ -109,9 +109,7 @@ with gr.Blocks(css=CSS, theme="soft") as demo:
|
|
109 |
additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
|
110 |
additional_inputs=[
|
111 |
gr.Textbox(
|
112 |
-
value=""
|
113 |
-
You are a helpful assistant.
|
114 |
-
""",
|
115 |
label="System Prompt",
|
116 |
lines=5,
|
117 |
render=False,
|
@@ -128,7 +126,7 @@ with gr.Blocks(css=CSS, theme="soft") as demo:
|
|
128 |
minimum=128,
|
129 |
maximum=8192,
|
130 |
step=1,
|
131 |
-
value=
|
132 |
label="Max new tokens",
|
133 |
render=False,
|
134 |
),
|
|
|
52 |
history: list,
|
53 |
system_prompt: str,
|
54 |
temperature: float = 0.8,
|
55 |
+
max_new_tokens: int = 512,
|
56 |
top_p: float = 1.0,
|
57 |
top_k: int = 20,
|
58 |
penalty: float = 1.2,
|
|
|
83 |
top_k = top_k,
|
84 |
temperature = temperature,
|
85 |
repetition_penalty=penalty,
|
86 |
+
eos_token_id=tokenizer.eos_token_id,
|
87 |
streamer=streamer,
|
88 |
)
|
89 |
|
|
|
109 |
additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
|
110 |
additional_inputs=[
|
111 |
gr.Textbox(
|
112 |
+
value="You are EXAONE model from LG AI Research, a helpful assistant.",
|
|
|
|
|
113 |
label="System Prompt",
|
114 |
lines=5,
|
115 |
render=False,
|
|
|
126 |
minimum=128,
|
127 |
maximum=8192,
|
128 |
step=1,
|
129 |
+
value= 512,
|
130 |
label="Max new tokens",
|
131 |
render=False,
|
132 |
),
|