ysharma HF Staff commited on
Commit
4beff3a
·
verified ·
1 Parent(s): 69bcbac

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +44 -39
config.py CHANGED
@@ -77,7 +77,6 @@ except ImportError:
77
  HTTPX_AVAILABLE = False
78
  logger.warning("httpx not available - file upload functionality limited")
79
 
80
- # CSS Configuration
81
  CUSTOM_CSS = """
82
  /* Hide Gradio footer */
83
  footer {
@@ -110,71 +109,77 @@ footer {
110
  padding-bottom: 0 !important;
111
  }
112
 
113
- /* === SIDEBAR STYLING === */
114
- /* Reduce padding inside sidebar container */
115
- .gradio-sidebar {
116
  padding: 0.75rem !important;
117
- gap: 0.5rem !important;
118
  }
119
 
120
- /* Reduce spacing between sidebar components */
121
- .gradio-sidebar > * {
122
  margin-bottom: 0.5rem !important;
123
- margin-top: 0 !important;
124
  }
125
 
126
- /* Reduce padding inside accordions */
127
- .gradio-sidebar .gradio-accordion {
 
 
 
 
 
 
 
 
 
128
  margin-bottom: 0.5rem !important;
 
129
  }
130
 
131
- .gradio-sidebar .gradio-accordion > div {
132
- padding: 0.5rem !important;
 
133
  }
134
 
135
- /* Compact markdown elements in sidebar */
136
- .gradio-sidebar .gradio-markdown {
137
  margin-bottom: 0.5rem !important;
138
- padding: 0.25rem 0 !important;
139
  }
140
 
141
- .gradio-sidebar .gradio-markdown h1,
142
- .gradio-sidebar .gradio-markdown h2,
143
- .gradio-sidebar .gradio-markdown h3 {
144
- margin-top: 0.25rem !important;
145
- margin-bottom: 0.25rem !important;
146
  }
147
 
148
- .gradio-sidebar .gradio-markdown p {
149
- margin-bottom: 0.25rem !important;
150
  }
151
 
152
- /* Reduce spacing for form elements in sidebar */
153
- .gradio-sidebar .gradio-textbox,
154
- .gradio-sidebar .gradio-dropdown,
155
- .gradio-sidebar .gradio-button {
156
  margin-bottom: 0.5rem !important;
157
  }
158
 
159
- /* Compact button spacing */
160
- .gradio-sidebar .gradio-button {
161
- margin-top: 0.25rem !important;
162
  margin-bottom: 0.25rem !important;
163
  }
164
 
165
- /* Reduce gap in form groups */
166
- .gradio-sidebar .gradio-form > * {
167
- margin-bottom: 0.25rem !important;
 
168
  }
169
 
170
- /* Compact accordion content */
171
- .gradio-sidebar .gradio-accordion-content {
172
- padding-top: 0.5rem !important;
173
- padding-bottom: 0.25rem !important;
174
  }
175
 
176
- /* Remove extra spacing from last elements */
177
- .gradio-sidebar > *:last-child {
178
- margin-bottom: 0 !important;
 
 
 
 
179
  }
180
  """
 
77
  HTTPX_AVAILABLE = False
78
  logger.warning("httpx not available - file upload functionality limited")
79
 
 
80
  CUSTOM_CSS = """
81
  /* Hide Gradio footer */
82
  footer {
 
109
  padding-bottom: 0 !important;
110
  }
111
 
112
+ /* Sidebar spacing optimizations */
113
+ #main-sidebar {
 
114
  padding: 0.75rem !important;
 
115
  }
116
 
117
+ /* Reduce margins for all elements inside sidebar */
118
+ #main-sidebar > * {
119
  margin-bottom: 0.5rem !important;
 
120
  }
121
 
122
+ #main-sidebar > *:last-child {
123
+ margin-bottom: 0 !important;
124
+ }
125
+
126
+ /* Compact markdown spacing in sidebar */
127
+ #main-sidebar .markdown {
128
+ margin-bottom: 0.5rem !important;
129
+ padding: 0.25rem 0 !important;
130
+ }
131
+
132
+ #main-sidebar .markdown h1 {
133
  margin-bottom: 0.5rem !important;
134
+ margin-top: 0 !important;
135
  }
136
 
137
+ #main-sidebar .markdown h2 {
138
+ margin-bottom: 0.4rem !important;
139
+ margin-top: 0.5rem !important;
140
  }
141
 
142
+ /* Accordion spacing optimization */
143
+ #main-sidebar .accordion {
144
  margin-bottom: 0.5rem !important;
 
145
  }
146
 
147
+ #main-sidebar .accordion summary {
148
+ padding: 0.5rem 0.75rem !important;
 
 
 
149
  }
150
 
151
+ #main-sidebar .accordion .accordion-content {
152
+ padding: 0.5rem 0.75rem !important;
153
  }
154
 
155
+ /* Textbox and input spacing */
156
+ #main-sidebar .textbox,
157
+ #main-sidebar .dropdown {
 
158
  margin-bottom: 0.5rem !important;
159
  }
160
 
161
+ #main-sidebar .textbox label,
162
+ #main-sidebar .dropdown label {
 
163
  margin-bottom: 0.25rem !important;
164
  }
165
 
166
+ /* Button spacing */
167
+ #main-sidebar .button {
168
+ margin-bottom: 0.5rem !important;
169
+ margin-top: 0.25rem !important;
170
  }
171
 
172
+ /* Server status section compact spacing */
173
+ #main-sidebar .status-section {
174
+ margin-bottom: 0.75rem !important;
 
175
  }
176
 
177
+ /* Remove excessive padding from form elements */
178
+ #main-sidebar .form {
179
+ gap: 0.5rem !important;
180
+ }
181
+
182
+ #main-sidebar .form > * {
183
+ margin-bottom: 0.25rem !important;
184
  }
185
  """