Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -104,6 +104,39 @@ with gr.Blocks(css='style.css') as demo:
|
|
104 |
gr.Markdown(LICENSE)
|
105 |
saved_input = gr.State()
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
textbox.submit(
|
109 |
fn=clear_and_save_textbox,
|
|
|
104 |
gr.Markdown(LICENSE)
|
105 |
saved_input = gr.State()
|
106 |
|
107 |
+
with gr.Accordion(label='Advanced options', open=False):
|
108 |
+
system_prompt = gr.Textbox(label='System prompt',
|
109 |
+
value=DEFAULT_SYSTEM_PROMPT,
|
110 |
+
lines=6)
|
111 |
+
max_new_tokens = gr.Slider(
|
112 |
+
label='Max new tokens',
|
113 |
+
minimum=1,
|
114 |
+
maximum=MAX_MAX_NEW_TOKENS,
|
115 |
+
step=1,
|
116 |
+
value=DEFAULT_MAX_NEW_TOKENS,
|
117 |
+
)
|
118 |
+
temperature = gr.Slider(
|
119 |
+
label='Temperature',
|
120 |
+
minimum=0.1,
|
121 |
+
maximum=4.0,
|
122 |
+
step=0.1,
|
123 |
+
value=0.1,
|
124 |
+
)
|
125 |
+
top_p = gr.Slider(
|
126 |
+
label='Top-p (nucleus sampling)',
|
127 |
+
minimum=0.05,
|
128 |
+
maximum=1.0,
|
129 |
+
step=0.05,
|
130 |
+
value=0.9,
|
131 |
+
)
|
132 |
+
top_k = gr.Slider(
|
133 |
+
label='Top-k',
|
134 |
+
minimum=1,
|
135 |
+
maximum=1000,
|
136 |
+
step=1,
|
137 |
+
value=10,
|
138 |
+
)
|
139 |
+
|
140 |
|
141 |
textbox.submit(
|
142 |
fn=clear_and_save_textbox,
|