abir-hr196 commited on
Commit
e24804d
·
1 Parent(s): c9e0bb8
Files changed (1) hide show
  1. app.py +116 -27
app.py CHANGED
@@ -83,27 +83,30 @@ examples = [
83
  ],
84
  ]
85
 
86
- # Custom CSS with Martian colors
87
  custom_css = """
88
  :root {
89
  --martian-orange: #FF6B4A;
90
  --martian-dark: #1A1A1A;
91
- --martian-gray: #2D2D2D;
92
- --martian-light-gray: #F5F5F5;
 
 
93
  }
94
 
95
  .gradio-container {
96
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
 
97
  }
98
 
99
  .header-section {
100
  text-align: center;
101
  padding: 3rem 2rem;
102
- background: linear-gradient(135deg, var(--martian-dark) 0%, var(--martian-gray) 100%);
103
  border-radius: 16px;
104
  margin-bottom: 2rem;
105
  color: white;
106
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
107
  }
108
 
109
  .header-section h1 {
@@ -117,6 +120,7 @@ custom_css = """
117
  font-size: 1.2rem;
118
  opacity: 0.9;
119
  line-height: 1.6;
 
120
  }
121
 
122
  .orange-accent {
@@ -125,26 +129,80 @@ custom_css = """
125
  }
126
 
127
  .info-box {
128
- background: var(--martian-light-gray);
129
  border-radius: 12px;
130
  padding: 1.5rem;
131
  margin: 1.5rem 0;
132
  border-left: 4px solid var(--martian-orange);
133
- color: var(--martian-dark);
134
  }
135
 
136
  .model-guide {
137
- background: var(--martian-light-gray);
138
  border-radius: 8px;
139
  padding: 1rem;
140
  margin-top: 1rem;
141
  font-size: 0.9rem;
142
- color: var(--martian-dark);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  }
144
 
 
 
 
 
 
145
  .citation-box {
146
- background: #E8E8E8;
147
- border: 1px solid #C0C0C0;
148
  border-radius: 12px;
149
  padding: 1.5rem;
150
  margin: 2rem 0;
@@ -154,11 +212,16 @@ custom_css = """
154
 
155
  .citation-header {
156
  font-weight: 700;
157
- color: var(--martian-dark);
158
  margin-bottom: 1rem;
159
  font-size: 1.1rem;
160
  }
161
 
 
 
 
 
 
162
  .resource-links {
163
  display: flex;
164
  gap: 1rem;
@@ -168,14 +231,14 @@ custom_css = """
168
  }
169
 
170
  .resource-link {
171
- background: var(--martian-dark);
172
  color: white;
173
  padding: 0.75rem 1.5rem;
174
  border-radius: 8px;
175
  text-decoration: none;
176
  font-weight: 500;
177
  transition: all 0.3s ease;
178
- border: 2px solid var(--martian-dark);
179
  }
180
 
181
  .resource-link:hover {
@@ -185,26 +248,52 @@ custom_css = """
185
  box-shadow: 0 4px 8px rgba(255, 107, 74, 0.3);
186
  }
187
 
188
- .primary-button {
189
- background: var(--martian-orange) !important;
190
- border: none !important;
191
- }
192
-
193
- .primary-button:hover {
194
- background: #FF5733 !important;
195
- transform: translateY(-1px);
196
- }
197
-
198
  footer {
199
  text-align: center;
200
  padding: 2rem 0;
201
- color: #666;
202
- border-top: 1px solid #ddd;
203
  margin-top: 3rem;
204
  font-size: 0.9rem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  }
206
- """
207
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  # Create Gradio interface
209
  with gr.Blocks(css=custom_css, title="TinySQL Demo", theme=gr.themes.Soft()) as demo:
210
 
 
83
  ],
84
  ]
85
 
86
+ # Custom CSS with Martian colors (Orange/Black/Dark Gray only)
87
  custom_css = """
88
  :root {
89
  --martian-orange: #FF6B4A;
90
  --martian-dark: #1A1A1A;
91
+ --martian-gray-dark: #3A3A3A;
92
+ --martian-gray-medium: #4A4A4A;
93
+ --martian-gray-light: #5A5A5A;
94
+ --martian-bg: #2A2A2A;
95
  }
96
 
97
  .gradio-container {
98
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
99
+ background-color: var(--martian-bg) !important;
100
  }
101
 
102
  .header-section {
103
  text-align: center;
104
  padding: 3rem 2rem;
105
+ background: linear-gradient(135deg, var(--martian-dark) 0%, var(--martian-gray-dark) 100%);
106
  border-radius: 16px;
107
  margin-bottom: 2rem;
108
  color: white;
109
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
110
  }
111
 
112
  .header-section h1 {
 
120
  font-size: 1.2rem;
121
  opacity: 0.9;
122
  line-height: 1.6;
123
+ color: white;
124
  }
125
 
126
  .orange-accent {
 
129
  }
130
 
131
  .info-box {
132
+ background: var(--martian-gray-dark);
133
  border-radius: 12px;
134
  padding: 1.5rem;
135
  margin: 1.5rem 0;
136
  border-left: 4px solid var(--martian-orange);
137
+ color: #E0E0E0;
138
  }
139
 
140
  .model-guide {
141
+ background: var(--martian-gray-dark);
142
  border-radius: 8px;
143
  padding: 1rem;
144
  margin-top: 1rem;
145
  font-size: 0.9rem;
146
+ color: #D0D0D0;
147
+ }
148
+
149
+ /* Remove all purple/blue colors from Gradio components */
150
+ .primary.svelte-cmf5ev {
151
+ background: var(--martian-orange) !important;
152
+ border-color: var(--martian-orange) !important;
153
+ }
154
+
155
+ button.primary {
156
+ background: var(--martian-orange) !important;
157
+ border: none !important;
158
+ color: white !important;
159
+ }
160
+
161
+ button.primary:hover {
162
+ background: #FF5733 !important;
163
+ }
164
+
165
+ /* Fix label colors */
166
+ label {
167
+ color: #D0D0D0 !important;
168
+ }
169
+
170
+ .label-wrap span {
171
+ color: var(--martian-orange) !important;
172
+ }
173
+
174
+ /* Input fields - dark theme */
175
+ .input-text, textarea, select, input {
176
+ background: var(--martian-gray-medium) !important;
177
+ border-color: var(--martian-gray-light) !important;
178
+ color: #E0E0E0 !important;
179
+ }
180
+
181
+ textarea::placeholder, input::placeholder {
182
+ color: #888 !important;
183
+ }
184
+
185
+ /* Slider colors */
186
+ input[type="range"] {
187
+ background: var(--martian-gray-medium) !important;
188
+ }
189
+
190
+ input[type="range"]::-webkit-slider-thumb {
191
+ background: var(--martian-orange) !important;
192
+ }
193
+
194
+ input[type="range"]::-moz-range-thumb {
195
+ background: var(--martian-orange) !important;
196
  }
197
 
198
+ input[type="range"]::-webkit-slider-runnable-track {
199
+ background: var(--martian-gray-light) !important;
200
+ }
201
+
202
+ /* Citation box - medium gray with light text */
203
  .citation-box {
204
+ background: var(--martian-gray-medium);
205
+ border: 1px solid var(--martian-gray-light);
206
  border-radius: 12px;
207
  padding: 1.5rem;
208
  margin: 2rem 0;
 
212
 
213
  .citation-header {
214
  font-weight: 700;
215
+ color: #E0E0E0;
216
  margin-bottom: 1rem;
217
  font-size: 1.1rem;
218
  }
219
 
220
+ .citation-box pre {
221
+ color: #D0D0D0;
222
+ background: transparent;
223
+ }
224
+
225
  .resource-links {
226
  display: flex;
227
  gap: 1rem;
 
231
  }
232
 
233
  .resource-link {
234
+ background: var(--martian-gray-dark);
235
  color: white;
236
  padding: 0.75rem 1.5rem;
237
  border-radius: 8px;
238
  text-decoration: none;
239
  font-weight: 500;
240
  transition: all 0.3s ease;
241
+ border: 2px solid var(--martian-gray-dark);
242
  }
243
 
244
  .resource-link:hover {
 
248
  box-shadow: 0 4px 8px rgba(255, 107, 74, 0.3);
249
  }
250
 
 
 
 
 
 
 
 
 
 
 
251
  footer {
252
  text-align: center;
253
  padding: 2rem 0;
254
+ color: #999;
255
+ border-top: 1px solid var(--martian-gray-dark);
256
  margin-top: 3rem;
257
  font-size: 0.9rem;
258
+ background: var(--martian-bg);
259
+ }
260
+
261
+ /* Remove light backgrounds everywhere */
262
+ .block, .panel {
263
+ background: var(--martian-gray-dark) !important;
264
+ }
265
+
266
+ .form {
267
+ background: var(--martian-gray-medium) !important;
268
+ }
269
+
270
+ /* Dropdown styling */
271
+ .dropdown {
272
+ background: var(--martian-gray-medium) !important;
273
+ color: #E0E0E0 !important;
274
+ }
275
+
276
+ /* Code output styling */
277
+ .code {
278
+ background: var(--martian-gray-dark) !important;
279
+ color: #E0E0E0 !important;
280
  }
 
281
 
282
+ /* Examples section */
283
+ .example {
284
+ background: var(--martian-gray-medium) !important;
285
+ border-color: var(--martian-gray-light) !important;
286
+ }
287
+
288
+ /* Markdown sections */
289
+ .markdown {
290
+ color: #D0D0D0 !important;
291
+ }
292
+
293
+ h1, h2, h3, h4, h5, h6 {
294
+ color: #E0E0E0 !important;
295
+ }
296
+ """
297
  # Create Gradio interface
298
  with gr.Blocks(css=custom_css, title="TinySQL Demo", theme=gr.themes.Soft()) as demo:
299