Ginidu2003 commited on
Commit
7ab03c4
·
verified ·
1 Parent(s): c7f80fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +45 -5
app.py CHANGED
@@ -121,18 +121,58 @@ def answer_question(news_content, question):
121
  # ====================== BEAUTIFUL UI ======================
122
  with gr.Blocks(
123
  title="English News Classifier",
124
- theme=gr.themes.Soft(), # Modern & Clean theme
125
  css="""
126
  .gradio-container {
127
- max-width: 1200px;
128
  margin: auto;
129
- background: linear-gradient(180deg, #1a1a2e, #16213e);
130
  }
131
  h1 {
132
  text-align: center;
133
- font-size: 2.8rem;
 
 
 
134
  margin-bottom: 10px;
135
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  """
137
  ) as demo:
138
 
@@ -146,7 +186,7 @@ with gr.Blocks(
146
  file_input = gr.File(
147
  label="📤 Upload your CSV file",
148
  file_types=[".csv"],
149
- height=140
150
  )
151
 
152
  classify_btn = gr.Button("🚀 Classify News", variant="primary", size="large")
 
121
  # ====================== BEAUTIFUL UI ======================
122
  with gr.Blocks(
123
  title="English News Classifier",
124
+ theme=gr.themes.Soft(),
125
  css="""
126
  .gradio-container {
127
+ max-width: 1250px;
128
  margin: auto;
129
+ background: linear-gradient(135deg, #0f172a 0%, #1e2937 100%);
130
  }
131
  h1 {
132
  text-align: center;
133
+ font-size: 2.9rem;
134
+ background: linear-gradient(90deg, #60a5fa, #c084fc);
135
+ -webkit-background-clip: text;
136
+ -webkit-text-fill-color: transparent;
137
  margin-bottom: 10px;
138
  }
139
+ /* Upload Box - Gradient */
140
+ .file-upload {
141
+ background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
142
+ border-radius: 16px;
143
+ border: none;
144
+ }
145
+ /* Classify News Button - Gradient */
146
+ button.primary {
147
+ background: linear-gradient(90deg, #6366f1, #a855f7) !important;
148
+ border: none;
149
+ font-weight: 700;
150
+ font-size: 1.1rem;
151
+ padding: 14px 0;
152
+ border-radius: 12px;
153
+ transition: all 0.3s ease;
154
+ }
155
+ button.primary:hover {
156
+ transform: translateY(-3px);
157
+ box-shadow: 0 15px 25px rgba(139, 92, 246, 0.5);
158
+ }
159
+ /* Status Box - Gradient */
160
+ .status-box {
161
+ background: linear-gradient(135deg, #10b981, #34d399) !important;
162
+ color: white;
163
+ border-radius: 12px;
164
+ }
165
+ /* Download Button - Gradient */
166
+ button.secondary {
167
+ background: linear-gradient(90deg, #ec4899, #f43f5e) !important;
168
+ color: white;
169
+ font-weight: 600;
170
+ }
171
+ /* Tab styling */
172
+ .tab-label {
173
+ font-size: 1.15rem;
174
+ font-weight: 600;
175
+ }
176
  """
177
  ) as demo:
178
 
 
186
  file_input = gr.File(
187
  label="📤 Upload your CSV file",
188
  file_types=[".csv"],
189
+ height=160
190
  )
191
 
192
  classify_btn = gr.Button("🚀 Classify News", variant="primary", size="large")