QAway-to commited on
Commit
e68a6e8
·
1 Parent(s): 80ee257

New style APP (Tab Changes v2.0)

Browse files
Files changed (1) hide show
  1. app.py +27 -4
app.py CHANGED
@@ -39,6 +39,24 @@ with gr.Blocks(theme=dark_theme, css="""
39
  font-family: 'Inter', sans-serif;
40
  background-color: #0d1117 !important;
41
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  h2, h3, .gr-markdown {
43
  font-weight: 600;
44
  color: #f0f6fc !important;
@@ -119,24 +137,29 @@ h2, h3, .gr-markdown {
119
  comp_input_2 = gr.Textbox(label="Portfolio B", value="b1ef37aa-5b9a-41b4-9394-8823f2de36bb")
120
  comp_button = gr.Button("Load Comparison", variant="primary")
121
 
122
- # Таблица и комментарий два разных вывода
123
- comp_output_table = gr.Dataframe(label="Comparative Metrics", wrap=True)
124
  comp_output_comment = gr.Textbox(
125
  label="AI Commentary",
126
  lines=8,
127
  interactive=False,
128
  show_copy_button=True,
 
 
 
 
 
 
 
129
  )
130
 
131
  from core.comparison_table import show_comparison_table
 
132
  comp_button.click(
133
  fn=show_comparison_table,
134
  inputs=[comp_input_1, comp_input_2],
135
  outputs=[comp_output_table, comp_output_comment],
136
  )
137
 
138
-
139
-
140
  # --- Chat Assistant Tab ---
141
  with gr.TabItem("Assistant"):
142
  chat_input = gr.Textbox(label="Ask about investments or analysis")
 
39
  font-family: 'Inter', sans-serif;
40
  background-color: #0d1117 !important;
41
  }
42
+ /* === LLM Commentary Styling === */
43
+ #llm_comment_box textarea {
44
+ max-height: 220px !important; /* ограничение высоты */
45
+ overflow-y: auto !important; /* вертикальный скроллинг */
46
+ background-color: #161b22 !important;
47
+ color: #f0f6fc !important;
48
+ border: 1px solid #30363d !important;
49
+ border-radius: 6px !important;
50
+ font-family: 'JetBrains Mono', monospace !important;
51
+ font-size: 14px !important;
52
+ line-height: 1.5 !important;
53
+ padding: 12px !important;
54
+ }
55
+ /* === Comparison Table === */
56
+ #comparison_table {
57
+ margin-top: 8px !important;
58
+ }
59
+
60
  h2, h3, .gr-markdown {
61
  font-weight: 600;
62
  color: #f0f6fc !important;
 
137
  comp_input_2 = gr.Textbox(label="Portfolio B", value="b1ef37aa-5b9a-41b4-9394-8823f2de36bb")
138
  comp_button = gr.Button("Load Comparison", variant="primary")
139
 
140
+ # комментарий теперь над таблицей
 
141
  comp_output_comment = gr.Textbox(
142
  label="AI Commentary",
143
  lines=8,
144
  interactive=False,
145
  show_copy_button=True,
146
+ elem_id="llm_comment_box",
147
+ )
148
+
149
+ comp_output_table = gr.Dataframe(
150
+ label="Comparative Metrics",
151
+ wrap=True,
152
+ elem_id="comparison_table",
153
  )
154
 
155
  from core.comparison_table import show_comparison_table
156
+
157
  comp_button.click(
158
  fn=show_comparison_table,
159
  inputs=[comp_input_1, comp_input_2],
160
  outputs=[comp_output_table, comp_output_comment],
161
  )
162
 
 
 
163
  # --- Chat Assistant Tab ---
164
  with gr.TabItem("Assistant"):
165
  chat_input = gr.Textbox(label="Ask about investments or analysis")