Rosehu commited on
Commit
8300c4b
·
verified ·
1 Parent(s): c2fa067

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,7 +1,8 @@
1
  # -*- coding: utf-8 -*-
2
  """
3
  HedgeFund Multi-Agent System for Hugging Face Spaces
4
- Beginner-friendly, with live market data, realistic fees & taxes.
 
5
  """
6
 
7
  import os, json, textwrap, datetime as dt
@@ -120,7 +121,6 @@ tax_agent = Agent(
120
  # -----------------------------
121
  def make_tasks(inputs: Dict[str, Any]) -> List[Task]:
122
  assets = inputs['assets']
123
- start_money = inputs['start_money']
124
  prices = get_market_prices(assets)
125
 
126
  t1 = Task(
@@ -202,6 +202,8 @@ def make_tasks(inputs: Dict[str, Any]) -> List[Task]:
202
  description=textwrap.dedent(f"""
203
  Synthesize final portfolio and Markdown report.
204
  Inputs: all previous JSONs
 
 
205
  Return STRICT JSON with keys:
206
  {{
207
  "final_portfolio": [...],
@@ -298,4 +300,4 @@ with gr.Blocks(title="HedgeFund Multi-Agent System") as demo_ui:
298
  outputs=[md_out, md_file, json_file]
299
  )
300
 
301
- demo_ui.launch(share=False)
 
1
  # -*- coding: utf-8 -*-
2
  """
3
  HedgeFund Multi-Agent System for Hugging Face Spaces
4
+ Live market data, realistic fees/taxes, beginner-friendly inputs,
5
+ JSON-safe costs, and Markdown report showing calculations.
6
  """
7
 
8
  import os, json, textwrap, datetime as dt
 
121
  # -----------------------------
122
  def make_tasks(inputs: Dict[str, Any]) -> List[Task]:
123
  assets = inputs['assets']
 
124
  prices = get_market_prices(assets)
125
 
126
  t1 = Task(
 
202
  description=textwrap.dedent(f"""
203
  Synthesize final portfolio and Markdown report.
204
  Inputs: all previous JSONs
205
+ Ensure all numeric values are pre-computed (JSON-safe)
206
+ Show human-readable calculations in Markdown
207
  Return STRICT JSON with keys:
208
  {{
209
  "final_portfolio": [...],
 
300
  outputs=[md_out, md_file, json_file]
301
  )
302
 
303
+ demo_ui.launch(share=False