Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -299,6 +299,26 @@ with gr.Blocks(title="Backend-Focused LLaMA/Mistral CRUD Assistant", theme=gr.th
|
|
| 299 |
.main-title {
|
| 300 |
margin-top: 0 !important; /* tighten top title spacing */
|
| 301 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 302 |
</style>
|
| 303 |
|
| 304 |
""")
|
|
@@ -317,17 +337,17 @@ with gr.Blocks(title="Backend-Focused LLaMA/Mistral CRUD Assistant", theme=gr.th
|
|
| 317 |
edit_title_box = gr.Textbox(label="Edit Chat Name", placeholder="Type new chat name…", visible=False)
|
| 318 |
|
| 319 |
# Model selection
|
| 320 |
-
gr.Markdown("### 🤖 Model Selection" ,elem_classes="compact-heading")
|
| 321 |
model_choice = gr.Dropdown(choices=list(MODELS.keys()), value=list(MODELS.keys())[0], label="Choose a model", interactive=True)
|
| 322 |
|
| 323 |
# Dataset selection
|
| 324 |
-
gr.Markdown("### 📚 Dataset Selection" ,elem_classes="compact-heading")
|
| 325 |
dataset_choice = gr.Dropdown(choices=DATASETS, value=DATASETS[0], label="Select a dataset", interactive=True)
|
| 326 |
|
| 327 |
# Generation settings
|
| 328 |
-
gr.Markdown("### ⚙️ Generation Settings" ,elem_classes="compact-heading")
|
| 329 |
with gr.Group(elem_classes="system-message-compact"):
|
| 330 |
-
system_box = gr.Textbox(value=SYSTEM_DEFAULT, label="System message", lines=
|
| 331 |
with gr.Group(elem_classes="compact-sliders"):
|
| 332 |
max_tokens = gr.Slider(256, 4096, value=1200, step=16, label="Max tokens")
|
| 333 |
temperature = gr.Slider(0.0, 2.0, value=0.25, step=0.05, label="Temperature")
|
|
|
|
| 299 |
.main-title {
|
| 300 |
margin-top: 0 !important; /* tighten top title spacing */
|
| 301 |
}
|
| 302 |
+
|
| 303 |
+
/* Compact sliders: reduce vertical height and spacing */
|
| 304 |
+
.compact-sliders .gr-slider {
|
| 305 |
+
height: 28px !important; /* shorter track */
|
| 306 |
+
padding: 0 !important; /* remove inner padding */
|
| 307 |
+
margin-bottom: 0.3rem !important; /* less spacing below each slider */
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
/* Compact slider label and value text */
|
| 311 |
+
.compact-sliders .gr-slider label,
|
| 312 |
+
.compact-sliders .gr-slider span {
|
| 313 |
+
font-size: 0.8rem !important; /* smaller text */
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
/* Optional: tighten the value box if slider shows a numeric box */
|
| 317 |
+
.compact-sliders input[type="number"] {
|
| 318 |
+
max-width: 70px !important; /* smaller numeric input width */
|
| 319 |
+
font-size: 0.8rem !important;
|
| 320 |
+
padding: 2px 4px !important;
|
| 321 |
+
}
|
| 322 |
</style>
|
| 323 |
|
| 324 |
""")
|
|
|
|
| 337 |
edit_title_box = gr.Textbox(label="Edit Chat Name", placeholder="Type new chat name…", visible=False)
|
| 338 |
|
| 339 |
# Model selection
|
| 340 |
+
# gr.Markdown("### 🤖 Model Selection" ,elem_classes="compact-heading")
|
| 341 |
model_choice = gr.Dropdown(choices=list(MODELS.keys()), value=list(MODELS.keys())[0], label="Choose a model", interactive=True)
|
| 342 |
|
| 343 |
# Dataset selection
|
| 344 |
+
# gr.Markdown("### 📚 Dataset Selection" ,elem_classes="compact-heading")
|
| 345 |
dataset_choice = gr.Dropdown(choices=DATASETS, value=DATASETS[0], label="Select a dataset", interactive=True)
|
| 346 |
|
| 347 |
# Generation settings
|
| 348 |
+
# gr.Markdown("### ⚙️ Generation Settings" ,elem_classes="compact-heading")
|
| 349 |
with gr.Group(elem_classes="system-message-compact"):
|
| 350 |
+
system_box = gr.Textbox(value=SYSTEM_DEFAULT, label="System message", lines=1)
|
| 351 |
with gr.Group(elem_classes="compact-sliders"):
|
| 352 |
max_tokens = gr.Slider(256, 4096, value=1200, step=16, label="Max tokens")
|
| 353 |
temperature = gr.Slider(0.0, 2.0, value=0.25, step=0.05, label="Temperature")
|