Spaces:
Sleeping
Sleeping
johns
commited on
Commit
•
6526e61
1
Parent(s):
035dfaa
prompt
Browse files
app.py
CHANGED
@@ -132,43 +132,43 @@ with gr.Blocks(css='style.css') as demo:
|
|
132 |
|
133 |
saved_input = gr.State()
|
134 |
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
|
173 |
textbox.submit(
|
174 |
fn=clear_and_save_textbox,
|
|
|
132 |
|
133 |
saved_input = gr.State()
|
134 |
|
135 |
+
with gr.Accordion(label='⚙️ Advanced options', open=False, visible=False):
|
136 |
+
system_prompt = gr.Textbox(label='System prompt',
|
137 |
+
value=DEFAULT_SYSTEM_PROMPT,
|
138 |
+
lines=0,
|
139 |
+
interactive=False)
|
140 |
+
max_new_tokens=256
|
141 |
+
temperature=0.1
|
142 |
+
top_p=0.9
|
143 |
+
top_k=10
|
144 |
+
max_new_tokens = gr.Slider(
|
145 |
+
label='Max new tokens',
|
146 |
+
minimum=1,
|
147 |
+
maximum=MAX_MAX_NEW_TOKENS,
|
148 |
+
step=1,
|
149 |
+
value=DEFAULT_MAX_NEW_TOKENS,
|
150 |
+
)
|
151 |
+
temperature = gr.Slider(
|
152 |
+
label='Temperature',
|
153 |
+
minimum=0.1,
|
154 |
+
maximum=4.0,
|
155 |
+
step=0.1,
|
156 |
+
value=0.1,
|
157 |
+
)
|
158 |
+
top_p = gr.Slider(
|
159 |
+
label='Top-p (nucleus sampling)',
|
160 |
+
minimum=0.05,
|
161 |
+
maximum=1.0,
|
162 |
+
step=0.05,
|
163 |
+
value=0.9,
|
164 |
+
)
|
165 |
+
top_k = gr.Slider(
|
166 |
+
label='Top-k',
|
167 |
+
minimum=1,
|
168 |
+
maximum=1000,
|
169 |
+
step=1,
|
170 |
+
value=10,
|
171 |
+
)
|
172 |
|
173 |
textbox.submit(
|
174 |
fn=clear_and_save_textbox,
|