luisoala commited on
Commit
e0eea58
·
1 Parent(s): e7aac80
Files changed (1) hide show
  1. app.py +38 -65
app.py CHANGED
@@ -71,32 +71,40 @@ def create_ui():
71
  # Define CSS for the validation UI with better borders and readability
72
  gr.HTML("""
73
  <style>
74
- /* Reset the overly aggressive transparency */
75
- .gradio-container *,
76
- .gradio-container *::before,
77
- .gradio-container *::after {
78
- background-color: initial; /* Remove the blanket transparency */
79
  }
80
 
81
- /* Make just the group containers transparent instead */
82
- .gr-group {
 
 
 
 
 
 
 
 
83
  background-color: transparent !important;
84
  border: none !important;
85
  box-shadow: none !important;
86
  }
87
 
88
- /* Fix tab container backgrounds */
89
- .tabs > .tab-nav {
90
  background-color: transparent !important;
 
91
  }
92
 
93
- /* Ensure buttons have proper backgrounds and text contrast */
94
- .primary-button, [variant="primary"], button.primary {
95
  background-color: var(--primary-500) !important;
96
  color: white !important;
97
  }
98
 
99
- /* Status indicator styles */
100
  .status-success {
101
  background-color: #4caf50 !important;
102
  color: white !important;
@@ -105,74 +113,39 @@ def create_ui():
105
  background-color: #f44336 !important;
106
  color: white !important;
107
  }
108
- .status-waiting {
109
- background-color: #9e9e9e !important;
110
- color: white !important;
111
- }
112
 
113
- /* Validation section styling */
114
- .validation-step {
115
- margin-bottom: 15px;
116
- border: 1px solid var(--border-color-primary, #e0e0e0);
117
- border-radius: 8px;
118
- overflow: hidden;
119
- }
120
- .step-header {
121
- padding: 10px 15px;
122
- background-color: var(--background-fill-secondary, #f5f5f5) !important;
123
- display: flex;
124
- align-items: center;
125
- cursor: pointer;
126
- }
127
- .step-left {
128
- display: flex;
129
- align-items: center;
130
- flex-grow: 1;
131
- }
132
- .step-status {
133
- margin-right: 10px;
134
- width: 24px;
135
- height: 24px;
136
- border-radius: 50%;
137
- display: flex;
138
- align-items: center;
139
- justify-content: center;
140
- font-weight: bold;
141
- font-size: 16px;
142
- text-shadow: 0px 0px 1px rgba(0,0,0,0.5);
143
- }
144
-
145
- /* Progress status container with border */
146
  .progress-container {
147
- min-height: 65px;
148
  padding: 12px;
149
  display: flex;
150
  align-items: center;
151
  margin-bottom: 10px;
152
- border: 1px solid var(--border-color-primary, #e0e0e0);
153
- border-radius: 8px;
154
- background-color: var(--background-fill-primary) !important;
155
  }
156
  .progress-status {
157
  font-style: italic;
158
  width: 100%;
159
  }
160
 
161
- /* Fix other UI elements */
162
- .dark .step-header {
163
- background-color: var(--background-fill-secondary, #2e2e2e) !important;
 
 
 
164
  }
165
- .step-details {
166
  padding: 10px 15px;
167
- background-color: var(--background-fill-primary) !important;
168
- }
169
- .arrow-indicator {
170
- margin-left: 10px;
171
- font-size: 16px;
172
- transition: transform 0.3s ease;
173
  }
174
- .arrow-down {
175
- transform: rotate(90deg);
 
176
  }
177
  </style>
178
  """)
 
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;
 
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
  """)