arubaDev commited on
Commit
fd12ee5
·
verified ·
1 Parent(s): d6e577b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -13
app.py CHANGED
@@ -249,18 +249,34 @@ with gr.Blocks(title="Backend-Focused LLaMA/Mistral CRUD Assistant", theme=gr.th
249
  # --- Custom CSS ---
250
  gr.HTML("""
251
  <style>
252
- /* Chat scroll */
253
- .gr-chatbot { max-height: 500px !important; overflow-y: auto !important; }
254
- /* Compact left panel */
255
- .compact-sliders .gr-slider, .compact-sliders .gr-number { margin-bottom:0.5rem !important; font-size:0.9rem;}
256
- .system-message-compact .gr-textarea { min-height:80px !important; max-height:120px !important; font-size:0.9rem; }
257
- /* Action buttons compact */
258
- #session-actions-row .gr-button { margin-right: 6px; margin-bottom:3px; font-size:0.9rem;}
259
- /* Input + buttons row */
260
- .user-input-row .gr-textbox, .user-input-row .gr-button { margin:0 !important; padding:0.4rem 0.6rem !important; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  </style>
262
  """)
263
-
264
  # gr.Markdown("## 🗄️ LLaMA & Mistral Backend-Focused CRUD Automation — Persistent History")
265
 
266
  with gr.Row(equal_height=True):
@@ -276,15 +292,15 @@ with gr.Blocks(title="Backend-Focused LLaMA/Mistral CRUD Assistant", theme=gr.th
276
  edit_title_box = gr.Textbox(label="Edit Chat Name", placeholder="Type new chat name…", visible=False)
277
 
278
  # Model selection
279
- gr.Markdown("### 🤖 Model Selection")
280
  model_choice = gr.Dropdown(choices=list(MODELS.keys()), value=list(MODELS.keys())[0], label="Choose a model", interactive=True)
281
 
282
  # Dataset selection
283
- gr.Markdown("### 📚 Dataset Selection")
284
  dataset_choice = gr.Dropdown(choices=DATASETS, value=DATASETS[0], label="Select a dataset", interactive=True)
285
 
286
  # Generation settings
287
- gr.Markdown("### ⚙️ Generation Settings")
288
  with gr.Group(elem_classes="system-message-compact"):
289
  system_box = gr.Textbox(value=SYSTEM_DEFAULT, label="System message", lines=3)
290
  with gr.Group(elem_classes="compact-sliders"):
 
249
  # --- Custom CSS ---
250
  gr.HTML("""
251
  <style>
252
+ /* Make all side-panel section headings smaller and tighter */
253
+ .compact-heading h3 {
254
+ font-size: 0.9rem !important;
255
+ font-weight: 600 !important;
256
+ margin: 0.3rem 0 !important;
257
+ padding: 0 !important;
258
+ }
259
+
260
+ /* General markdown at top title smaller */
261
+ .main-title h2 {
262
+ font-size: 1.2rem !important;
263
+ font-weight: 700 !important;
264
+ margin-bottom: 0.6rem !important;
265
+ }
266
+
267
+ /* Reduce spacing below sliders and dropdowns */
268
+ .compact-sliders .gr-slider,
269
+ .compact-sliders .gr-number,
270
+ .compact-sliders .gr-dropdown {
271
+ margin-bottom: 0.4rem !important;
272
+ }
273
+
274
+ /* Compact the overall column */
275
+ .left-panel .gr-column {
276
+ gap: 0.3rem !important;
277
+ }
278
  </style>
279
  """)
 
280
  # gr.Markdown("## 🗄️ LLaMA & Mistral Backend-Focused CRUD Automation — Persistent History")
281
 
282
  with gr.Row(equal_height=True):
 
292
  edit_title_box = gr.Textbox(label="Edit Chat Name", placeholder="Type new chat name…", visible=False)
293
 
294
  # Model selection
295
+ gr.Markdown("### 🤖 Model Selection" ,elem_classes="compact-heading")
296
  model_choice = gr.Dropdown(choices=list(MODELS.keys()), value=list(MODELS.keys())[0], label="Choose a model", interactive=True)
297
 
298
  # Dataset selection
299
+ gr.Markdown("### 📚 Dataset Selection" ,elem_classes="compact-heading")
300
  dataset_choice = gr.Dropdown(choices=DATASETS, value=DATASETS[0], label="Select a dataset", interactive=True)
301
 
302
  # Generation settings
303
+ gr.Markdown("### ⚙️ Generation Settings" ,elem_classes="compact-heading")
304
  with gr.Group(elem_classes="system-message-compact"):
305
  system_box = gr.Textbox(value=SYSTEM_DEFAULT, label="System message", lines=3)
306
  with gr.Group(elem_classes="compact-sliders"):