Spaces:
Runtime error
Runtime error
UI fixes
Browse files
app.py
CHANGED
|
@@ -158,57 +158,51 @@ def respond(
|
|
| 158 |
yield output
|
| 159 |
|
| 160 |
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
</div>
|
| 168 |
-
"""
|
| 169 |
-
)
|
| 170 |
-
|
| 171 |
-
chatbot = gr.ChatInterface(
|
| 172 |
-
respond,
|
| 173 |
type="messages",
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
),
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
),
|
| 208 |
-
],
|
| 209 |
-
additional_inputs_accordion=gr.Accordion("Generation settings", open=False),
|
| 210 |
-
)
|
| 211 |
|
| 212 |
|
| 213 |
if __name__ == "__main__":
|
| 214 |
-
|
|
|
|
| 158 |
yield output
|
| 159 |
|
| 160 |
|
| 161 |
+
chatbot = gr.ChatInterface(
|
| 162 |
+
respond,
|
| 163 |
+
type="messages",
|
| 164 |
+
title="Dreadzone",
|
| 165 |
+
description="CPU-only local chat with NVIDIA Nemotron 3 Nano 4B GGUF.",
|
| 166 |
+
chatbot=gr.Chatbot(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
type="messages",
|
| 168 |
+
height=420,
|
| 169 |
+
show_copy_button=True,
|
| 170 |
+
container=True,
|
| 171 |
+
),
|
| 172 |
+
additional_inputs=[
|
| 173 |
+
gr.Textbox(
|
| 174 |
+
value=DEFAULT_SYSTEM_PROMPT,
|
| 175 |
+
label="System message",
|
| 176 |
+
lines=3,
|
| 177 |
),
|
| 178 |
+
gr.Slider(
|
| 179 |
+
minimum=32,
|
| 180 |
+
maximum=1024,
|
| 181 |
+
value=384,
|
| 182 |
+
step=16,
|
| 183 |
+
label="Max new tokens",
|
| 184 |
+
),
|
| 185 |
+
gr.Slider(
|
| 186 |
+
minimum=0.0,
|
| 187 |
+
maximum=1.5,
|
| 188 |
+
value=0.7,
|
| 189 |
+
step=0.05,
|
| 190 |
+
label="Temperature",
|
| 191 |
+
),
|
| 192 |
+
gr.Slider(minimum=0.1, maximum=1.0, value=0.9, step=0.05, label="Top-p"),
|
| 193 |
+
gr.Slider(
|
| 194 |
+
minimum=1.0,
|
| 195 |
+
maximum=1.3,
|
| 196 |
+
value=1.1,
|
| 197 |
+
step=0.01,
|
| 198 |
+
label="Repeat penalty",
|
| 199 |
+
),
|
| 200 |
+
],
|
| 201 |
+
additional_inputs_accordion=gr.Accordion("Generation settings", open=False),
|
| 202 |
+
css=CSS,
|
| 203 |
+
theme=gr.themes.Soft(),
|
| 204 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 205 |
|
| 206 |
|
| 207 |
if __name__ == "__main__":
|
| 208 |
+
chatbot.queue(max_size=8).launch()
|