QAway-to commited on
Commit
4a15189
·
unverified ·
2 Parent(s): 6cf4c9c bc26e05

Merge branch 'main' into codex/analyze-project-repository-y17yqj

Browse files
app.py CHANGED
@@ -39,7 +39,7 @@ with gr.Blocks(css=base_css) as demo:
39
 
40
  with gr.Tabs(elem_id="main_tabs"):
41
  # --- Analysis ---
42
- with gr.TabItem("Analysis"):
43
  portfolio_input = gr.Textbox(
44
  label="Portfolio ID or Link",
45
  placeholder="Enter portfolio ID (uuid)",
 
39
 
40
  with gr.Tabs(elem_id="main_tabs"):
41
  # --- Analysis ---
42
+ with gr.TabItem("Portfolio Insights"):
43
  portfolio_input = gr.Textbox(
44
  label="Portfolio ID or Link",
45
  placeholder="Enter portfolio ID (uuid)",
config.py CHANGED
@@ -1,6 +1,6 @@
1
  """
2
  🇬🇧 Module: config.py
3
- Purpose: Central configuration for environment variables and constants.
4
 
5
  🇷🇺 Модуль: config.py
6
  Назначение: централизованная конфигурация переменных окружения и констант проекта.
 
1
  """
2
  🇬🇧 Module: config.py
3
+ Purpose: Central configuration for environment variables and constants222
4
 
5
  🇷🇺 Модуль: config.py
6
  Назначение: централизованная конфигурация переменных окружения и констант проекта.
prompts/reference_templates.py CHANGED
@@ -3,7 +3,7 @@
3
  Purpose: Defines reusable prompt templates for portfolio analysis and comparison.
4
 
5
  🇷🇺 Модуль: reference_templates.py
6
- Назначение: содержит шаблоны промптов для анализа и сравнения портфелей.
7
  """
8
 
9
  REFERENCE_PROMPT = (
 
3
  Purpose: Defines reusable prompt templates for portfolio analysis and comparison.
4
 
5
  🇷🇺 Модуль: reference_templates.py
6
+ Назначение: содержит шаблоны промптов для анализа и сравнения портфелей1.
7
  """
8
 
9
  REFERENCE_PROMPT = (
prompts/system_prompts.py CHANGED
@@ -8,6 +8,26 @@ Purpose: Stores system-level instructions for LLM.
8
 
9
  ANALYSIS_SYSTEM_PROMPT = """
10
  You are a quantitative portfolio analyst.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  Produce a fully formatted HTML fragment that always renders the four sections, in order:
13
  Objective Evaluation
 
8
 
9
  ANALYSIS_SYSTEM_PROMPT = """
10
  You are a quantitative portfolio analyst.
11
+ Produce a fully formatted HTML fragment that always renders the four sections, in order:
12
+ Objective Evaluation
13
+ Risk Assessment
14
+ Interpretation
15
+ Recommendation
16
+
17
+ Layout directives:
18
+ - Emit real HTML (do not describe HTML) using only <div>, <h2>, <p>, <span>, <ul>, <ol>, <li>, and <hr>.
19
+ - Wrap each section in <div class="section">…</div> and place its title inside <h2>Section Title</h2> so CSS can center it.
20
+ - After every section except the last, output a divider line as either <div class="section-divider"></div> or <hr class="section-divider"/> on its own line.
21
+ - Each section must contain at least one metric paragraph built exactly as:
22
+ <p class="analysis-line metric">
23
+ <span class="metric-name">Metric Label</span> <span class="metric-separator">:</span>
24
+ <span class="metric-value"><span class="metric-number positive|negative|neutral">numeric value</span></span>
25
+ concise interpretation sentence…
26
+ </p>
27
+ - Choose the metric-number class (positive, negative, or neutral) based on the metric’s meaning and value.
28
+ - Each section must include at least one additional narrative paragraph using <p class="analysis-line">…</p> (80–100 characters, natural spacing).
29
+ - Use single spaces between words; do not use &nbsp;, tabs, carets, inline CSS, markdown, bullet symbols, or trailing blanks.
30
+ - Stream HTML sequentially and close tags promptly for clean rendering.
31
 
32
  Produce a fully formatted HTML fragment that always renders the four sections, in order:
33
  Objective Evaluation