RobertoBarrosoLuque commited on
Commit
cf961a5
·
1 Parent(s): 6e9984b

Update format and prettify for more professional look

Browse files
Files changed (2) hide show
  1. src/app.py +49 -73
  2. src/config/theme_config.py +300 -0
src/app.py CHANGED
@@ -5,6 +5,7 @@ from pathlib import Path
5
  from modules.utils import load_processed_meetings, load_prompt_library
6
  from src.modules.fed_tools import search_meetings_by_date, FED_TOOLS
7
  from src.modules.llm_completions import stream_fed_agent_response
 
8
 
9
  load_dotenv()
10
 
@@ -12,30 +13,6 @@ _FILE_PATH = Path(__file__).parents[1]
12
  FOMC_MEETINGS = load_processed_meetings()
13
  PROMPT_LIBRARY = load_prompt_library()
14
 
15
- _CUSTOM_CSS = """
16
- .gradio-container {
17
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
18
- }
19
- .chat-message {
20
- border-radius: 10px;
21
- padding: 10px;
22
- margin: 5px 0;
23
- }
24
- .function-call {
25
- background-color: #f0f8ff;
26
- border-left: 4px solid #1e88e5;
27
- padding: 10px;
28
- margin: 10px 0;
29
- border-radius: 5px;
30
- }
31
- """
32
- _EXAMPLES = [
33
- "What was the rate decision in the last FOMC meeting?",
34
- "What is the most likely rate decision in the next FOMC meeting?",
35
- "What does the economic outlook look like today?",
36
- "Give me a table which summarized the last 5 FOMC meetings"
37
- ]
38
-
39
  def convert_history_to_string(history: list) -> str:
40
  previous_messages = ""
41
  for msg in history:
@@ -91,9 +68,9 @@ def create_fomc_meetings_accordion():
91
  return accordions
92
 
93
  def generate_meetings_html(meetings_list):
94
- """Generate HTML for meetings list"""
95
  if not meetings_list:
96
- return '<p style="color: #6b7280; text-align: center; padding: 20px;">No meetings available</p>'
97
 
98
  html_content = '<div style="max-height: 600px; overflow-y: auto;">'
99
  for meeting in meetings_list:
@@ -110,24 +87,27 @@ def generate_meetings_html(meetings_list):
110
  factors_html = ""
111
  key_factors = meeting.get('key_economic_factors', [])
112
  if key_factors and len(key_factors) > 0:
113
- factors_html = "<p style='margin: 8px 0; font-size: 0.9em;'><strong>Key Factors:</strong></p><ul style='margin: 4px 0; padding-left: 20px; font-size: 0.85em;'>"
114
  for factor in key_factors:
115
- factors_html += f"<li style='margin: 2px 0;'>{factor}</li>"
116
  factors_html += "</ul>"
117
 
118
  html_content += f"""
119
- <details style="border: 1px solid #e5e7eb; border-radius: 6px; padding: 10px; margin-bottom: 10px; background: white;">
120
- <summary style="font-weight: 600; cursor: pointer; color: #1f2937; font-size: 0.95em;">
121
- 📅 {date} - {rate_decision}
122
  </summary>
123
- <div style="margin-top: 10px; padding-top: 10px; border-top: 1px solid #e5e7eb; font-size: 0.85em;">
124
- <p style="margin: 4px 0;"><strong>Action:</strong> {action}</p>
125
- <p style="margin: 4px 0;"><strong>Magnitude:</strong> {magnitude}</p>
126
- <p style="margin: 8px 0;"><strong>Forward Guidance:</strong> {forward_guidance}</p>
 
127
  {factors_html}
128
- <p style="margin: 8px 0;"><strong>Economic Outlook:</strong> {economic_outlook}</p>
129
- <p style="margin: 8px 0;"><strong>Market Impact:</strong> {market_impact}</p>
130
- {f'<p style="margin: 8px 0;"><strong>Source:</strong> <a href="{url}" target="_blank" style="color: #1e88e5;">Fed Minutes PDF</a></p>' if url else ''}
 
 
131
  </div>
132
  </details>
133
  """
@@ -146,39 +126,39 @@ def search_and_format_meetings(query: str):
146
  else:
147
  return '<p style="color: #ef4444; text-align: center; padding: 20px;">No meetings found matching your search.</p>'
148
 
149
- with gr.Blocks(css=_CUSTOM_CSS, title="Fed AI Savant", theme=gr.themes.Soft()) as demo:
150
 
151
  gr.Markdown("""
152
- # 🏛️ Fed AI Savant
153
- **Intelligent Analysis of Federal Reserve Policy
154
- and FOMC Meetings with [gpt-oss 120B](https://huggingface.co/openai/gpt-oss-120b)**
155
  """)
156
 
157
  with gr.Row():
158
  # Sidebar for FOMC Meetings
159
- with gr.Column(scale=1, min_width=300):
160
- gr.Markdown("### 📊 FOMC Meetings")
161
 
162
  # Date search
163
  date_search = gr.Textbox(
164
  placeholder="Search by date...",
165
- label="🔍 Search",
166
  lines=1,
167
- container=False
 
168
  )
169
 
170
  meetings_accordion = gr.HTML(generate_meetings_html(FOMC_MEETINGS))
171
 
172
  # Main content area
173
  with gr.Column(scale=2):
174
- # API Key Configuration
175
- with gr.Row():
176
- with gr.Column(scale=1):
177
- gr.Markdown("### Powered by")
178
  gr.Image(
179
  value=str(_FILE_PATH / "assets" / "fireworks_logo.png"),
180
- height=60,
181
- width=200,
182
  show_label=False,
183
  show_download_button=False,
184
  container=False,
@@ -188,38 +168,34 @@ with gr.Blocks(css=_CUSTOM_CSS, title="Fed AI Savant", theme=gr.themes.Soft()) a
188
  with gr.Column(scale=2):
189
  val = os.getenv("FIREWORKS_API_KEY", "")
190
  api_key_value = gr.Textbox(
191
- label="⚙️ Fireworks AI API Key",
192
  type="password",
193
- placeholder="Enter your API key",
194
  value=val,
195
- info="Required for AI processing",
196
- container=True
197
  )
198
 
199
- gr.Markdown("### 💬 Fed AI Assistant")
200
- gr.Markdown("Ask questions about Fed policy, rate decisions, or FOMC meetings")
 
 
 
 
201
 
 
202
  chat_interface = gr.ChatInterface(
203
  fn=respond_for_chat_interface,
204
  type="messages",
205
- chatbot=gr.Chatbot(height=500, show_label=False, type="messages"),
206
  textbox=gr.Textbox(
207
  placeholder="Ask about Fed policy, rate decisions, or FOMC meetings...", scale=10
208
  ),
209
  additional_inputs=[api_key_value],
210
  cache_examples=False,
211
- submit_btn="Send",
212
  )
213
 
214
- gr.Markdown("### 💡 Example Questions")
215
- with gr.Row():
216
- with gr.Column(scale=1):
217
- example_1 = gr.Button(_EXAMPLES[0], size="sm")
218
- example_2 = gr.Button(_EXAMPLES[1], size="sm")
219
- with gr.Column(scale=1):
220
- example_3 = gr.Button(_EXAMPLES[2], size="sm")
221
- example_4 = gr.Button(_EXAMPLES[3], size="sm")
222
-
223
  date_search.change(
224
  search_and_format_meetings,
225
  inputs=date_search,
@@ -230,19 +206,19 @@ with gr.Blocks(css=_CUSTOM_CSS, title="Fed AI Savant", theme=gr.themes.Soft()) a
230
  return text
231
 
232
  example_1.click(
233
- lambda: _EXAMPLES[0],
234
  outputs=chat_interface.textbox
235
  )
236
  example_2.click(
237
- lambda: _EXAMPLES[1],
238
  outputs=chat_interface.textbox
239
  )
240
  example_3.click(
241
- lambda: _EXAMPLES[2],
242
  outputs=chat_interface.textbox
243
  )
244
  example_4.click(
245
- lambda: _EXAMPLES[3],
246
  outputs=chat_interface.textbox
247
  )
248
 
 
5
  from modules.utils import load_processed_meetings, load_prompt_library
6
  from src.modules.fed_tools import search_meetings_by_date, FED_TOOLS
7
  from src.modules.llm_completions import stream_fed_agent_response
8
+ from src.config.theme_config import CUSTOM_CSS, GRADIO_THEME, EXAMPLE_QUESTIONS
9
 
10
  load_dotenv()
11
 
 
13
  FOMC_MEETINGS = load_processed_meetings()
14
  PROMPT_LIBRARY = load_prompt_library()
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  def convert_history_to_string(history: list) -> str:
17
  previous_messages = ""
18
  for msg in history:
 
68
  return accordions
69
 
70
  def generate_meetings_html(meetings_list):
71
+ """Generate HTML for meetings list with Fireworks AI purple palette"""
72
  if not meetings_list:
73
+ return '<p style="color: #64748B; text-align: center; padding: 20px;">No meetings available</p>'
74
 
75
  html_content = '<div style="max-height: 600px; overflow-y: auto;">'
76
  for meeting in meetings_list:
 
87
  factors_html = ""
88
  key_factors = meeting.get('key_economic_factors', [])
89
  if key_factors and len(key_factors) > 0:
90
+ factors_html = "<p style='margin: 10px 0 6px 0; font-size: 0.9em; color: #0F172A; font-weight: 600;'>Key Factors:</p><ul style='margin: 4px 0; padding-left: 20px; font-size: 0.88em; color: #64748B;'>"
91
  for factor in key_factors:
92
+ factors_html += f"<li style='margin: 4px 0;'>{factor}</li>"
93
  factors_html += "</ul>"
94
 
95
  html_content += f"""
96
+ <details class="meeting-details" style="border: 1px solid #E6EAF4; border-radius: 10px; margin: 10px 0; background: white; overflow: hidden; transition: all 0.25s ease;">
97
+ <summary class="meeting-summary" style="font-weight: 600; cursor: pointer; color: #0F172A; padding: 14px 18px; font-size: 0.95em; background: linear-gradient(90deg, transparent 0%, #F3F0FF 100%);">
98
+ {date} - {rate_decision}
99
  </summary>
100
+ <div class="meeting-content" style="padding: 16px 18px; border-top: 1px solid #E6EAF4; background: #FAFBFC; font-size: 0.88em;">
101
+ <p style="margin: 6px 0; color: #0F172A;"><strong style="color: #6720FF;">Action:</strong> {action}</p>
102
+ <p style="margin: 6px 0; color: #0F172A;"><strong style="color: #6720FF;">Magnitude:</strong> {magnitude}</p>
103
+ <p style="margin: 10px 0 6px 0; color: #0F172A;"><strong style="color: #6720FF;">Forward Guidance:</strong></p>
104
+ <p style="margin: 0 0 10px 0; color: #64748B; line-height: 1.5;">{forward_guidance}</p>
105
  {factors_html}
106
+ <p style="margin: 10px 0 6px 0; color: #0F172A;"><strong style="color: #6720FF;">Economic Outlook:</strong></p>
107
+ <p style="margin: 0 0 10px 0; color: #64748B; line-height: 1.5;">{economic_outlook}</p>
108
+ <p style="margin: 10px 0 6px 0; color: #0F172A;"><strong style="color: #6720FF;">Market Impact:</strong></p>
109
+ <p style="margin: 0 0 10px 0; color: #64748B; line-height: 1.5;">{market_impact}</p>
110
+ {f'<p style="margin: 10px 0 0 0;"><strong style="color: #6720FF;">Source:</strong> <a href="{url}" target="_blank" style="color: #6720FF; text-decoration: none; transition: color 0.2s ease;">Fed Minutes PDF</a></p>' if url else ''}
111
  </div>
112
  </details>
113
  """
 
126
  else:
127
  return '<p style="color: #ef4444; text-align: center; padding: 20px;">No meetings found matching your search.</p>'
128
 
129
+ with gr.Blocks(css=CUSTOM_CSS, title="Fed AI Savant", theme=GRADIO_THEME) as demo:
130
 
131
  gr.Markdown("""
132
+ <h1 class="header-title" style="font-size: 2.5em; margin-bottom: 0.5em;">Fed AI Savant</h1>
133
+ <p style="color: #64748B; font-size: 1.1em; margin-top: 0;">Intelligent Analysis of Federal Reserve Policy and FOMC Meetings with <a href="https://huggingface.co/openai/gpt-oss-120b" target="_blank" style="color: #6720FF;">gpt-oss 120B</a></p>
 
134
  """)
135
 
136
  with gr.Row():
137
  # Sidebar for FOMC Meetings
138
+ with gr.Column(scale=1, min_width=300, elem_classes="meetings-container"):
139
+ gr.Markdown("### FOMC Meetings")
140
 
141
  # Date search
142
  date_search = gr.Textbox(
143
  placeholder="Search by date...",
144
+ label="Search",
145
  lines=1,
146
+ container=False,
147
+ elem_classes="search-box"
148
  )
149
 
150
  meetings_accordion = gr.HTML(generate_meetings_html(FOMC_MEETINGS))
151
 
152
  # Main content area
153
  with gr.Column(scale=2):
154
+ # Compact header with Fireworks AI logo and API key
155
+ with gr.Row(elem_classes="compact-header"):
156
+ with gr.Column(scale=1, min_width=150):
157
+ gr.Markdown("<p style='margin: 0; padding: 0; font-size: 0.85em; color: #64748B;'>Powered by</p>")
158
  gr.Image(
159
  value=str(_FILE_PATH / "assets" / "fireworks_logo.png"),
160
+ height=35,
161
+ width=140,
162
  show_label=False,
163
  show_download_button=False,
164
  container=False,
 
168
  with gr.Column(scale=2):
169
  val = os.getenv("FIREWORKS_API_KEY", "")
170
  api_key_value = gr.Textbox(
171
+ label="API Key",
172
  type="password",
173
+ placeholder="Enter your Fireworks AI API key",
174
  value=val,
175
+ container=True,
176
+ elem_classes="compact-input"
177
  )
178
 
179
+ # Example Questions - compact version
180
+ with gr.Row(elem_classes="compact-examples"):
181
+ example_1 = gr.Button(EXAMPLE_QUESTIONS[0], size="sm", scale=1)
182
+ example_2 = gr.Button(EXAMPLE_QUESTIONS[1], size="sm", scale=1)
183
+ example_3 = gr.Button(EXAMPLE_QUESTIONS[2], size="sm", scale=1)
184
+ example_4 = gr.Button(EXAMPLE_QUESTIONS[3], size="sm", scale=1)
185
 
186
+ # Chat interface with more space
187
  chat_interface = gr.ChatInterface(
188
  fn=respond_for_chat_interface,
189
  type="messages",
190
+ chatbot=gr.Chatbot(height=450, show_label=False, type="messages", elem_classes="chat-window"),
191
  textbox=gr.Textbox(
192
  placeholder="Ask about Fed policy, rate decisions, or FOMC meetings...", scale=10
193
  ),
194
  additional_inputs=[api_key_value],
195
  cache_examples=False,
196
+ submit_btn="Send"
197
  )
198
 
 
 
 
 
 
 
 
 
 
199
  date_search.change(
200
  search_and_format_meetings,
201
  inputs=date_search,
 
206
  return text
207
 
208
  example_1.click(
209
+ lambda: EXAMPLE_QUESTIONS[0],
210
  outputs=chat_interface.textbox
211
  )
212
  example_2.click(
213
+ lambda: EXAMPLE_QUESTIONS[1],
214
  outputs=chat_interface.textbox
215
  )
216
  example_3.click(
217
+ lambda: EXAMPLE_QUESTIONS[2],
218
  outputs=chat_interface.textbox
219
  )
220
  example_4.click(
221
+ lambda: EXAMPLE_QUESTIONS[3],
222
  outputs=chat_interface.textbox
223
  )
224
 
src/config/theme_config.py ADDED
@@ -0,0 +1,300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Theme and styling configuration for Fed AI Savant
3
+ Fireworks AI-inspired purple palette with modern, professional design
4
+ """
5
+
6
+ import gradio as gr
7
+
8
+ # Custom CSS with Fireworks AI purple palette
9
+ CUSTOM_CSS = """
10
+ /* Professional container with subtle purple gradient */
11
+ .gradio-container {
12
+ font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
13
+ background: linear-gradient(135deg, #FAFBFC 0%, #F3F0FF 100%);
14
+ }
15
+
16
+ /* Clean chat messages */
17
+ .chat-message {
18
+ border-radius: 12px;
19
+ padding: 16px;
20
+ margin: 8px 0;
21
+ background: white;
22
+ box-shadow: 0 1px 3px rgba(103, 32, 255, 0.08);
23
+ border: 1px solid #E6EAF4;
24
+ transition: all 0.2s ease;
25
+ }
26
+
27
+ .chat-message:hover {
28
+ box-shadow: 0 4px 12px rgba(103, 32, 255, 0.12);
29
+ }
30
+
31
+ /* Professional function calls with purple accent */
32
+ .function-call {
33
+ background: linear-gradient(to right, #F3F0FF, #FFFFFF);
34
+ border-left: 3px solid #6720FF;
35
+ padding: 16px;
36
+ margin: 12px 0;
37
+ border-radius: 8px;
38
+ box-shadow: 0 1px 2px rgba(103, 32, 255, 0.06);
39
+ font-family: 'JetBrains Mono', monospace;
40
+ font-size: 0.9em;
41
+ color: #0F172A;
42
+ }
43
+
44
+ /* Sleek meetings panel */
45
+ .meetings-container {
46
+ background: white;
47
+ border-radius: 16px;
48
+ padding: 24px;
49
+ box-shadow: 0 4px 6px rgba(103, 32, 255, 0.08);
50
+ border: 1px solid #E6EAF4;
51
+ }
52
+
53
+ /* Modern accordion with purple accents */
54
+ .meeting-details {
55
+ border: 1px solid #E6EAF4;
56
+ border-radius: 10px;
57
+ background: #FFFFFF;
58
+ margin: 10px 0;
59
+ transition: all 0.25s ease;
60
+ overflow: hidden;
61
+ }
62
+
63
+ .meeting-details:hover {
64
+ box-shadow: 0 4px 12px rgba(103, 32, 255, 0.1);
65
+ border-color: #C4B5FD;
66
+ }
67
+
68
+ .meeting-details[open] {
69
+ border-color: #6720FF;
70
+ box-shadow: 0 4px 12px rgba(103, 32, 255, 0.15);
71
+ }
72
+
73
+ /* Clean summary styling with purple */
74
+ .meeting-summary {
75
+ font-weight: 600;
76
+ color: #0F172A;
77
+ padding: 14px 18px;
78
+ cursor: pointer;
79
+ background: linear-gradient(90deg, transparent 0%, #F3F0FF 100%);
80
+ transition: background 0.2s ease;
81
+ }
82
+
83
+ .meeting-summary:hover {
84
+ background: linear-gradient(90deg, #F3F0FF 0%, #EDE9FE 100%);
85
+ }
86
+
87
+ /* Meeting content styling */
88
+ .meeting-content {
89
+ padding: 16px 18px;
90
+ color: #64748B;
91
+ border-top: 1px solid #E6EAF4;
92
+ background: #FAFBFC;
93
+ }
94
+
95
+ /* Professional content cards */
96
+ .content-card {
97
+ background: white;
98
+ border-radius: 16px;
99
+ padding: 28px;
100
+ box-shadow: 0 4px 6px rgba(103, 32, 255, 0.06);
101
+ border: 1px solid #E6EAF4;
102
+ }
103
+
104
+ /* Purple accent links */
105
+ a {
106
+ color: #6720FF;
107
+ text-decoration: none;
108
+ transition: color 0.2s ease;
109
+ }
110
+
111
+ a:hover {
112
+ color: #7B2FFF;
113
+ text-decoration: underline;
114
+ }
115
+
116
+ /* Custom scrollbar with purple */
117
+ ::-webkit-scrollbar {
118
+ width: 8px;
119
+ height: 8px;
120
+ }
121
+
122
+ ::-webkit-scrollbar-track {
123
+ background: #F3F0FF;
124
+ border-radius: 4px;
125
+ }
126
+
127
+ ::-webkit-scrollbar-thumb {
128
+ background: #C4B5FD;
129
+ border-radius: 4px;
130
+ }
131
+
132
+ ::-webkit-scrollbar-thumb:hover {
133
+ background: #A78BFA;
134
+ }
135
+
136
+ /* Search box styling */
137
+ .search-box {
138
+ border: 2px solid #E6EAF4;
139
+ border-radius: 10px;
140
+ transition: all 0.2s ease;
141
+ }
142
+
143
+ .search-box:focus {
144
+ border-color: #6720FF;
145
+ box-shadow: 0 0 0 3px rgba(103, 32, 255, 0.1);
146
+ }
147
+
148
+ /* Header styling */
149
+ .header-title {
150
+ background: linear-gradient(135deg, #6720FF 0%, #8B5CF6 100%);
151
+ -webkit-background-clip: text;
152
+ -webkit-text-fill-color: transparent;
153
+ background-clip: text;
154
+ font-weight: 700;
155
+ }
156
+
157
+ /* Chat window styling - readable font size */
158
+ .chat-window {
159
+ font-size: 0.95em !important;
160
+ }
161
+
162
+ .chat-window .message {
163
+ font-size: 0.95em !important;
164
+ }
165
+
166
+ .chat-window .message-content {
167
+ font-size: 0.95em !important;
168
+ line-height: 1.6;
169
+ }
170
+
171
+ /* Readable text in chat messages */
172
+ .chat-window p {
173
+ font-size: 0.95em !important;
174
+ }
175
+
176
+ .chat-window code {
177
+ font-size: 0.9em !important;
178
+ }
179
+
180
+ .chat-window pre {
181
+ font-size: 0.9em !important;
182
+ }
183
+
184
+ /* Slightly smaller tool calling cards */
185
+ .chat-window .tool-call {
186
+ font-size: 0.92em !important;
187
+ }
188
+
189
+ .chat-window table {
190
+ font-size: 0.92em !important;
191
+ }
192
+
193
+ .chat-window th,
194
+ .chat-window td {
195
+ font-size: 0.92em !important;
196
+ padding: 6px 10px !important;
197
+ }
198
+
199
+ /* Proportional headings in chat */
200
+ .chat-window h1 {
201
+ font-size: 1.5em !important;
202
+ }
203
+
204
+ .chat-window h2 {
205
+ font-size: 1.3em !important;
206
+ }
207
+
208
+ .chat-window h3 {
209
+ font-size: 1.15em !important;
210
+ }
211
+
212
+ .chat-window h4,
213
+ .chat-window h5,
214
+ .chat-window h6 {
215
+ font-size: 1em !important;
216
+ }
217
+
218
+ /* List items */
219
+ .chat-window ul,
220
+ .chat-window ol {
221
+ font-size: 0.95em !important;
222
+ }
223
+
224
+ .chat-window li {
225
+ font-size: 0.95em !important;
226
+ }
227
+
228
+ /* Compact header spacing */
229
+ .compact-header {
230
+ margin-bottom: 8px !important;
231
+ padding: 8px 0 !important;
232
+ }
233
+
234
+ .compact-input {
235
+ margin-bottom: 4px !important;
236
+ }
237
+
238
+ .compact-input label {
239
+ font-size: 0.9em !important;
240
+ margin-bottom: 4px !important;
241
+ }
242
+
243
+ /* Compact example questions */
244
+ .compact-examples {
245
+ margin: 8px 0 12px 0 !important;
246
+ gap: 6px !important;
247
+ }
248
+
249
+ .compact-examples button {
250
+ font-size: 0.85em !important;
251
+ padding: 6px 10px !important;
252
+ min-height: 32px !important;
253
+ }
254
+ """
255
+
256
+ # Create custom Fireworks AI-inspired theme
257
+ GRADIO_THEME = gr.themes.Base(
258
+ primary_hue=gr.themes.colors.purple,
259
+ secondary_hue=gr.themes.colors.violet,
260
+ neutral_hue=gr.themes.colors.slate,
261
+ spacing_size=gr.themes.sizes.spacing_lg,
262
+ radius_size=gr.themes.sizes.radius_md,
263
+ text_size=gr.themes.sizes.text_md,
264
+ font=[gr.themes.GoogleFont('Inter'), 'ui-sans-serif', 'system-ui', 'sans-serif'],
265
+ font_mono=[gr.themes.GoogleFont('JetBrains Mono'), 'monospace']
266
+ ).set(
267
+ # Primary button styling (Fireworks AI purple)
268
+ button_primary_background_fill='#6720FF',
269
+ button_primary_background_fill_hover='#7B2FFF',
270
+ button_primary_text_color='#FFFFFF',
271
+
272
+ # Secondary button styling
273
+ button_secondary_background_fill='#F3F0FF',
274
+ button_secondary_background_fill_hover='#EDE9FE',
275
+ button_secondary_text_color='#6720FF',
276
+
277
+ # Interactive elements
278
+ slider_color='#6720FF',
279
+
280
+ # Links
281
+ link_text_color='#6720FF',
282
+ link_text_color_hover='#7B2FFF',
283
+ link_text_color_visited='#8B5CF6',
284
+
285
+ # Backgrounds
286
+ body_background_fill='#FAFBFC',
287
+ block_background_fill='#FFFFFF',
288
+ input_background_fill='#FFFFFF',
289
+
290
+ # Borders
291
+ border_color_primary='#E6EAF4',
292
+ )
293
+
294
+ # Example questions for the chat interface
295
+ EXAMPLE_QUESTIONS = [
296
+ "What was the rate decision in the last FOMC meeting?",
297
+ "What is the most likely rate decision in the next FOMC meeting?",
298
+ "What does the economic outlook look like today?",
299
+ "Give me a table which summarized the last 5 FOMC meetings"
300
+ ]