acecalisto3 commited on
Commit
9afd018
·
verified ·
1 Parent(s): 175e428

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +95 -0
app.py CHANGED
@@ -174,6 +174,101 @@ except AttributeError as e:
174
  logger.warning(f"Could not apply all theme settings (might be Gradio version difference): {e}. Using default Soft theme.")
175
  theme = gr.themes.Soft()
176
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
 
178
  # ========== Enhanced Webhook Handler ==========
179
  class WebhookHandler(BaseHTTPRequestHandler):
 
174
  logger.warning(f"Could not apply all theme settings (might be Gradio version difference): {e}. Using default Soft theme.")
175
  theme = gr.themes.Soft()
176
 
177
+ # Additional UI/UX Enhancements
178
+ custom_css = """
179
+ /* Smooth transitions for buttons and inputs */
180
+ button, input, select, textarea {
181
+ transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
182
+ }
183
+
184
+ /* Hover effects for buttons */
185
+ button:hover {
186
+ filter: brightness(1.1);
187
+ }
188
+
189
+ /* Focus styles for inputs */
190
+ input:focus, select:focus, textarea:focus {
191
+ outline: none;
192
+ border-color: #8B5CF6;
193
+ box-shadow: 0 0 5px rgba(139, 92, 246, 0.5);
194
+ }
195
+
196
+ /* Scrollbar styling for scrollable divs */
197
+ #issue_preview_div::-webkit-scrollbar,
198
+ #ai_output_md::-webkit-scrollbar {
199
+ width: 8px;
200
+ }
201
+
202
+ #issue_preview_div::-webkit-scrollbar-thumb,
203
+ #ai_output_md::-webkit-scrollbar-thumb {
204
+ background-color: #8B5CF6;
205
+ border-radius: 4px;
206
+ }
207
+
208
+ /* Responsive layout improvements */
209
+ @media (max-width: 768px) {
210
+ #config-panel {
211
+ flex-direction: column !important;
212
+ }
213
+ #issue_list_df {
214
+ font-size: 0.9em !important;
215
+ }
216
+ }
217
+
218
+ /* Enhanced table styles */
219
+ .gradio-dataframe-container table {
220
+ border-collapse: separate !important;
221
+ border-spacing: 0 8px !important;
222
+ }
223
+
224
+ .gradio-dataframe-container table tr {
225
+ background-color: #f9fafb !important;
226
+ border-radius: 8px !important;
227
+ box-shadow: 0 1px 3px rgba(0,0,0,0.1);
228
+ }
229
+
230
+ .gradio-dataframe-container table tr:hover {
231
+ background-color: #ede9fe !important;
232
+ cursor: pointer;
233
+ }
234
+
235
+ /* Button styles */
236
+ .gr-button {
237
+ border-radius: 8px !important;
238
+ font-weight: 600 !important;
239
+ }
240
+
241
+ /* Accordion header styles */
242
+ #ai_tools_accordion > .label {
243
+ font-weight: 700 !important;
244
+ font-size: 1.1em !important;
245
+ color: #6b21a8 !important;
246
+ }
247
+
248
+ /* Status bar improvements */
249
+ #status_output_txt textarea {
250
+ background-color: #f3f4f6 !important;
251
+ border-radius: 6px !important;
252
+ font-family: 'Fira Code', monospace !important;
253
+ font-size: 0.95em !important;
254
+ color: #4b5563 !important;
255
+ }
256
+
257
+ /* Code editor improvements */
258
+ #code_editor_component {
259
+ border: 1px solid #ddd !important;
260
+ border-radius: 8px !important;
261
+ box-shadow: 0 2px 6px rgba(139, 92, 246, 0.15);
262
+ }
263
+
264
+ /* Plot improvements */
265
+ #stats_plot_viz, #analytics_severity_plot {
266
+ border-radius: 8px;
267
+ box-shadow: 0 2px 8px rgba(0,0,0,0.1);
268
+ background-color: white;
269
+ }
270
+ """
271
+
272
 
273
  # ========== Enhanced Webhook Handler ==========
274
  class WebhookHandler(BaseHTTPRequestHandler):