adikwok commited on
Commit
4b7beba
Β·
verified Β·
1 Parent(s): 59c2070

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -31
app.py CHANGED
@@ -138,41 +138,33 @@ def get_topics_list() -> List[str]:
138
  # Custom CSS for better UI
139
  custom_css = """
140
  .gradio-container {
141
- max-width: 1200px !important;
142
- margin: 0 auto !important;
 
143
  }
144
 
145
- .main-chat {
146
- border: 1px solid #e0e0e0;
147
- border-radius: 12px;
148
- padding: 20px;
149
- background: #fafafa;
150
  }
151
 
152
- .input-area {
153
- background: white;
154
- border-radius: 8px;
155
- padding: 15px;
156
- margin-top: 10px;
157
  }
158
 
159
- .history-area {
160
- background: white;
161
- border-radius: 8px;
162
- padding: 15px;
163
- margin-top: 10px;
164
  }
165
 
166
- .tab-nav {
167
- background: #f5f5f5;
168
- border-radius: 8px 8px 0 0;
169
- }
170
-
171
- /* Copy button styling */
172
- .copy-button {
173
- background: #4CAF50 !important;
174
- color: white !important;
175
- border-radius: 4px !important;
176
  }
177
  """
178
 
@@ -188,7 +180,7 @@ with gr.Blocks(
188
 
189
  with gr.Tabs() as tabs:
190
  # MAIN CHAT TAB
191
- with gr.Tab("πŸ’¬ Chat", elem_classes="main-chat"):
192
  # AI Response Area (Top)
193
  ai_response = gr.Textbox(
194
  label="πŸ€– AI Response",
@@ -201,7 +193,7 @@ with gr.Blocks(
201
  )
202
 
203
  # Input Area (Bottom)
204
- with gr.Group(elem_classes="input-area"):
205
  with gr.Row():
206
  user_input = gr.Textbox(
207
  label="✍️ Your Message",
@@ -224,7 +216,7 @@ with gr.Blocks(
224
 
225
  # HISTORY TAB
226
  with gr.Tab("πŸ“š Chat History"):
227
- with gr.Group(elem_classes="history-area"):
228
  with gr.Row():
229
  topic_filter = gr.Dropdown(
230
  label="πŸ” Filter by Topic",
@@ -245,7 +237,8 @@ with gr.Blocks(
245
  max_lines=30,
246
  interactive=False,
247
  show_copy_button=True,
248
- placeholder="Chat history and summaries will appear here..."
 
249
  )
250
 
251
  # Event Handlers
 
138
  # Custom CSS for better UI
139
  custom_css = """
140
  .gradio-container {
141
+ max-width: 100% !important;
142
+ padding: 0 !important;
143
+ margin: 0 !important;
144
  }
145
 
146
+ .main {
147
+ max-width: 100% !important;
148
+ padding: 10px !important;
 
 
149
  }
150
 
151
+ /* AI Response text spacing */
152
+ .response-area textarea {
153
+ line-height: 1.6 !important;
154
+ padding: 15px !important;
155
+ font-size: 14px !important;
156
  }
157
 
158
+ /* History text spacing */
159
+ .history-display textarea {
160
+ line-height: 1.6 !important;
161
+ padding: 15px !important;
162
+ font-size: 14px !important;
163
  }
164
 
165
+ /* Better text readability */
166
+ textarea {
167
+ line-height: 1.6 !important;
 
 
 
 
 
 
 
168
  }
169
  """
170
 
 
180
 
181
  with gr.Tabs() as tabs:
182
  # MAIN CHAT TAB
183
+ with gr.Tab("πŸ’¬ Chat"):
184
  # AI Response Area (Top)
185
  ai_response = gr.Textbox(
186
  label="πŸ€– AI Response",
 
193
  )
194
 
195
  # Input Area (Bottom)
196
+ with gr.Group():
197
  with gr.Row():
198
  user_input = gr.Textbox(
199
  label="✍️ Your Message",
 
216
 
217
  # HISTORY TAB
218
  with gr.Tab("πŸ“š Chat History"):
219
+ with gr.Group():
220
  with gr.Row():
221
  topic_filter = gr.Dropdown(
222
  label="πŸ” Filter by Topic",
 
237
  max_lines=30,
238
  interactive=False,
239
  show_copy_button=True,
240
+ placeholder="Chat history and summaries will appear here...",
241
+ elem_classes="history-display"
242
  )
243
 
244
  # Event Handlers