eaglelandsonce commited on
Commit
489aeed
1 Parent(s): 1d47132

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -11
app.py CHANGED
@@ -48,7 +48,9 @@ if not GOOGLE_AI_STUDIO:
48
  raise ValueError("API key not found. Please set the GOOGLE_AI_STUDIO2 environment variable.")
49
 
50
 
51
-
 
 
52
 
53
 
54
  # LangChain function for company analysis
@@ -93,15 +95,12 @@ def company_analysis(api_key: str, company_name: str) -> dict:
93
 
94
 
95
 
96
-
97
-
98
-
99
-
100
  print("google-generativeai:", genai.__version__)
101
 
 
102
  GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY")
103
 
104
- TITLE_INTRO = """<h1 align="center">Introduction to Financial Manager</h1>"""
105
 
106
  TITLE1 = """<h1 align="center">Company Analysis</h1>"""
107
  TITLE2 = """<h1 align="center">Investment Strategy</h1>"""
@@ -501,10 +500,13 @@ def output_results(start_date, end_date, tickers_string):
501
 
502
  with gr.Blocks() as demo:
503
 
504
- with gr.Tab("Introduction"):
505
- gr.HTML(TITLE_INTRO)
 
 
506
 
507
- with gr.Tab("Your Portfolio"):
 
508
  run_button_crewai = gr.Button(value="Run", variant="primary", scale=1)
509
  run_button_crewai.click(
510
  fn=crewai_process,
@@ -513,10 +515,11 @@ with gr.Blocks() as demo:
513
  )
514
 
515
 
516
- with gr.Tab("Portfolio Analysis"):
 
517
  with gr.Blocks() as app:
518
  with gr.Row():
519
- gr.HTML("<h1>Bohmian's Stock Portfolio Optimizer</h1>")
520
 
521
  with gr.Row():
522
  start_date = gr.Textbox("2013-01-01", label="Start Date")
 
48
  raise ValueError("API key not found. Please set the GOOGLE_AI_STUDIO2 environment variable.")
49
 
50
 
51
+ STEP1_TITLE = """<h1 align="center">Describe Your Investment Goals & Create a Portfolio</h1>"""
52
+ STEP2_TITLE = """<h1 align="center">Create a Financial OutLook Report of Your Portfolio</h1>"""
53
+ STEP3_TITLE = """<h1 align="center">Optimize Your Portfolio to Maximize Return</h1>"""
54
 
55
 
56
  # LangChain function for company analysis
 
95
 
96
 
97
 
 
 
 
 
98
  print("google-generativeai:", genai.__version__)
99
 
100
+
101
  GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY")
102
 
103
+
104
 
105
  TITLE1 = """<h1 align="center">Company Analysis</h1>"""
106
  TITLE2 = """<h1 align="center">Investment Strategy</h1>"""
 
500
 
501
  with gr.Blocks() as demo:
502
 
503
+ with gr.Tab("Step 1: Investment Goals"):
504
+ gr.HTML(STEP1_TITLE)
505
+
506
+
507
 
508
+ with gr.Tab("Step 2: Financial Outlook"):
509
+ gr.HTML(STEP2_TITLE)
510
  run_button_crewai = gr.Button(value="Run", variant="primary", scale=1)
511
  run_button_crewai.click(
512
  fn=crewai_process,
 
515
  )
516
 
517
 
518
+ with gr.Tab("Step 3: Optimize Portfolio"):
519
+ gr.HTML(STEP3_TITLE)
520
  with gr.Blocks() as app:
521
  with gr.Row():
522
+ gr.HTML("<h1>Stock Portfolio Optimizer</h1>")
523
 
524
  with gr.Row():
525
  start_date = gr.Textbox("2013-01-01", label="Start Date")