eaglelandsonce commited on
Commit
29da034
1 Parent(s): 6d55bc1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -14
app.py CHANGED
@@ -631,7 +631,8 @@ with gr.Blocks() as demo:
631
  with gr.Column(scale=5):
632
  gr.Textbox(value = portfolios_output, label="Generated Portfolios Example (Conservative, Growth, Balanced, & Agressive)", lines=40, interactive=False )
633
 
634
-
 
635
  with gr.Tab("Step 2: Optimize Portfolio"):
636
  gr.HTML(STEP3_TITLE)
637
  with gr.Blocks() as app:
@@ -706,7 +707,7 @@ with gr.Blocks() as demo:
706
  expected_annual_return, annual_volatility, sharpe_ratio, fig_indiv_prices, fig_cum_returns])
707
 
708
 
709
- with gr.Tab("Step 3: Portfolio Analysis"):
710
  gr.HTML(STEP2_TITLE)
711
  run_button_crewai = gr.Button(value="Run", variant="primary", scale=1)
712
  run_button_crewai.click(
@@ -716,18 +717,6 @@ with gr.Blocks() as demo:
716
  )
717
 
718
 
719
- with gr.Row():
720
- fig_cum_returns_optimized = gr.Plot(label="Cumulative Returns of Optimized Portfolio (Starting Price of $100)")
721
- weights_df = gr.DataFrame(label="Optimized Weights of Each Ticker")
722
-
723
-
724
- with gr.Row(visible=False):
725
- fig_efficient_frontier = gr.Plot(label="Efficient Frontier")
726
- fig_corr = gr.Plot(label="Correlation between Stocks")
727
-
728
- with gr.Row(visible=False):
729
- fig_indiv_prices = gr.Plot(label="Price of Individual Stocks")
730
- fig_cum_returns = gr.Plot(label="Cumulative Returns of Individual Stocks Starting with $100")
731
 
732
 
733
  # For future upgrade
 
631
  with gr.Column(scale=5):
632
  gr.Textbox(value = portfolios_output, label="Generated Portfolios Example (Conservative, Growth, Balanced, & Agressive)", lines=40, interactive=False )
633
 
634
+ # Note: a portion of the Optimize Portfolio code was taken from Damian Boh open source code on Hugging Face and was rewritten for this application.
635
+
636
  with gr.Tab("Step 2: Optimize Portfolio"):
637
  gr.HTML(STEP3_TITLE)
638
  with gr.Blocks() as app:
 
707
  expected_annual_return, annual_volatility, sharpe_ratio, fig_indiv_prices, fig_cum_returns])
708
 
709
 
710
+ with gr.Tab("Step 3: Fine Tuning"):
711
  gr.HTML(STEP2_TITLE)
712
  run_button_crewai = gr.Button(value="Run", variant="primary", scale=1)
713
  run_button_crewai.click(
 
717
  )
718
 
719
 
 
 
 
 
 
 
 
 
 
 
 
 
720
 
721
 
722
  # For future upgrade