luisoala commited on
Commit
7fee061
·
1 Parent(s): e0eea58
Files changed (1) hide show
  1. app.py +35 -56
app.py CHANGED
@@ -68,84 +68,63 @@ def create_ui():
68
  # Validation results
69
  validation_results = gr.HTML(visible=False)
70
 
71
- # Define CSS for the validation UI with better borders and readability
72
  gr.HTML("""
73
  <style>
74
- /* Set max width and center the app */
75
- .gradio-container {
76
- max-width: 700px !important;
77
- margin: 0 auto !important;
78
- }
79
-
80
- /* Add better visual separation with borders instead of backgrounds */
81
- .file-preview, .gr-file, .gr-form, .gr-panel, .gr-box, .gr-input,
82
- .gr-input-label, .gr-input-container, .progress-container {
83
- border: 1px solid var(--border-color-primary, rgba(128, 128, 128, 0.2)) !important;
84
- border-radius: 8px !important;
85
- background-color: rgba(255, 255, 255, 0.03) !important;
86
- }
87
-
88
- /* Make group containers transparent */
89
- .gr-group, .gr-form {
90
- background-color: transparent !important;
91
- border: none !important;
92
- box-shadow: none !important;
93
- }
94
-
95
- /* Clean up tab styling */
96
- .tabs, .tabitem, .tab-nav {
97
- background-color: transparent !important;
98
- border: none !important;
99
  }
100
 
101
- /* Ensure buttons have proper styling */
102
- button.primary, button[data-testid="primary-button"] {
103
  background-color: var(--primary-500) !important;
104
- color: white !important;
105
  }
106
 
107
- /* Status indicator styling */
108
  .status-success {
109
  background-color: #4caf50 !important;
110
- color: white !important;
111
  }
112
  .status-error {
113
  background-color: #f44336 !important;
114
- color: white !important;
115
  }
116
 
117
- /* Progress container styling */
 
 
 
 
 
 
 
 
 
 
 
 
118
  .progress-container {
119
  min-height: 50px;
120
  padding: 12px;
121
- display: flex;
122
- align-items: center;
123
  margin-bottom: 10px;
124
- background-color: transparent !important;
125
- }
126
- .progress-status {
127
- font-style: italic;
128
- width: 100%;
129
  }
130
 
131
- /* Validation results styling */
132
- .validation-step {
133
- margin-bottom: 15px;
134
- border: 1px solid var(--border-color-primary, rgba(128, 128, 128, 0.2));
135
- border-radius: 8px;
136
- overflow: hidden;
137
  }
138
- .step-header {
139
- padding: 10px 15px;
140
- display: flex;
141
- align-items: center;
142
- cursor: pointer;
143
- border-bottom: 1px solid var(--border-color-primary, rgba(128, 128, 128, 0.1));
144
- background-color: transparent !important;
145
  }
146
- .step-details {
147
- padding: 10px 15px;
148
- background-color: transparent !important;
149
  }
150
  </style>
151
  """)
 
68
  # Validation results
69
  validation_results = gr.HTML(visible=False)
70
 
71
+ # Define CSS for the validation UI with extreme overrides
72
  gr.HTML("""
73
  <style>
74
+ /* Force ALL elements to have the same background as the page */
75
+ *, *::before, *::after,
76
+ .gradio-container, .gradio-container *,
77
+ .dark .gradio-container, .dark .gradio-container *,
78
+ [class*="container"], [class*="panel"], [class*="box"], [class*="group"],
79
+ .tab-nav, .tabitem, .tab-panel,
80
+ .file-preview, .progress-container, .gr-form {
81
+ background-color: var(--body-background-fill) !important;
82
+ border-color: var(--border-color-primary) !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  }
84
 
85
+ /* Only allow specific elements to have their own background */
86
+ button.primary, .status-success, .status-error, .status-waiting {
87
  background-color: var(--primary-500) !important;
 
88
  }
89
 
90
+ /* Specific styling for status indicators */
91
  .status-success {
92
  background-color: #4caf50 !important;
 
93
  }
94
  .status-error {
95
  background-color: #f44336 !important;
 
96
  }
97
 
98
+ /* Set max width and center the app */
99
+ .gradio-container {
100
+ max-width: 650px !important;
101
+ margin: 0 auto !important;
102
+ }
103
+
104
+ /* Ensure borders for element definition */
105
+ .file-preview, .gr-box, .progress-container, .validation-step {
106
+ border: 1px solid var(--border-color-primary) !important;
107
+ border-radius: 8px !important;
108
+ }
109
+
110
+ /* Ensure good spacing */
111
  .progress-container {
112
  min-height: 50px;
113
  padding: 12px;
 
 
114
  margin-bottom: 10px;
 
 
 
 
 
115
  }
116
 
117
+ /* Override any other potential background settings */
118
+ .gr-panel, .gr-box, .gr-form {
119
+ background-image: none !important;
 
 
 
120
  }
121
+
122
+ /* Tab styling */
123
+ .tabs > .tab-nav > button {
124
+ border-bottom: 2px solid transparent;
 
 
 
125
  }
126
+ .tabs > .tab-nav > button.selected {
127
+ border-bottom: 2px solid var(--primary-500);
 
128
  }
129
  </style>
130
  """)