eaglelandsonce commited on
Commit
d30067e
1 Parent(s): 4d7d865

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -48,7 +48,7 @@ if not GOOGLE_AI_STUDIO:
48
  raise ValueError("API key not found. Please set the GOOGLE_AI_STUDIO2 environment variable.")
49
 
50
 
51
- STEP1_TITLE = """<h1 align="center">Click => <a href="https://chat.openai.com/g/g-3ZNjAmguz-portfolio-investment-advisor">Custom GPT Portfolio Generator</a></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
 
@@ -621,19 +621,9 @@ with gr.Blocks() as demo:
621
  gr.Image(value="resources/robot1.jpg")
622
  with gr.Column(scale=5):
623
  gr.Textbox(value = portfolios_output, label="Generated Portfolios Example (Concervative, Growth, Balanced, & Agressive)", lines=40, interactive=False )
 
624
 
625
-
626
- with gr.Tab("Step 2: Financial Outlook"):
627
- gr.HTML(STEP2_TITLE)
628
- run_button_crewai = gr.Button(value="Run", variant="primary", scale=1)
629
- run_button_crewai.click(
630
- fn=crewai_process,
631
- inputs=gr.Textbox(lines=2, placeholder="Enter Research Topic Here..."),
632
- outputs=gr.Textbox(label="Portfolio Analysis")
633
- )
634
-
635
-
636
- with gr.Tab("Step 3: Optimize Portfolio"):
637
  gr.HTML(STEP3_TITLE)
638
  with gr.Blocks() as app:
639
  with gr.Row():
@@ -647,6 +637,9 @@ with gr.Blocks() as demo:
647
  tickers_string = gr.Textbox("MA,META,V,AMZN,JPM,BA",
648
  label='Enter all stock tickers to be included in portfolio separated \
649
  by commas WITHOUT spaces, e.g. "MA,META,V,AMZN,JPM,BA"')
 
 
 
650
  btn = gr.Button("Get Optimized Portfolio")
651
 
652
  with gr.Row():
@@ -673,7 +666,14 @@ with gr.Blocks() as demo:
673
  outputs=[fig_cum_returns_optimized, weights_df, fig_efficient_frontier, fig_corr, \
674
  expected_annual_return, annual_volatility, sharpe_ratio, fig_indiv_prices, fig_cum_returns])
675
 
676
-
 
 
 
 
 
 
 
677
 
678
 
679
  with gr.Tab("Company Analysis"):
 
48
  raise ValueError("API key not found. Please set the GOOGLE_AI_STUDIO2 environment variable.")
49
 
50
 
51
+ STEP1_TITLE = """<h1 align="center">Click Link <a href="https://chat.openai.com/g/g-3ZNjAmguz-portfolio-investment-advisor">Custom GPT Portfolio Generator</a></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
 
 
621
  gr.Image(value="resources/robot1.jpg")
622
  with gr.Column(scale=5):
623
  gr.Textbox(value = portfolios_output, label="Generated Portfolios Example (Concervative, Growth, Balanced, & Agressive)", lines=40, interactive=False )
624
+
625
 
626
+ with gr.Tab("Step 2: Optimize Portfolio"):
 
 
 
 
 
 
 
 
 
 
 
627
  gr.HTML(STEP3_TITLE)
628
  with gr.Blocks() as app:
629
  with gr.Row():
 
637
  tickers_string = gr.Textbox("MA,META,V,AMZN,JPM,BA",
638
  label='Enter all stock tickers to be included in portfolio separated \
639
  by commas WITHOUT spaces, e.g. "MA,META,V,AMZN,JPM,BA"')
640
+
641
+ print("printing sticker string")
642
+ print(tickers_string)
643
  btn = gr.Button("Get Optimized Portfolio")
644
 
645
  with gr.Row():
 
666
  outputs=[fig_cum_returns_optimized, weights_df, fig_efficient_frontier, fig_corr, \
667
  expected_annual_return, annual_volatility, sharpe_ratio, fig_indiv_prices, fig_cum_returns])
668
 
669
+ with gr.Tab("Step 3: Financial Outlook"):
670
+ gr.HTML(STEP2_TITLE)
671
+ run_button_crewai = gr.Button(value="Run", variant="primary", scale=1)
672
+ run_button_crewai.click(
673
+ fn=crewai_process,
674
+ inputs=gr.Textbox(lines=2, placeholder="Enter Research Topic Here..."),
675
+ outputs=gr.Textbox(label="Portfolio Analysis")
676
+ )
677
 
678
 
679
  with gr.Tab("Company Analysis"):