Spaces:
Sleeping
Sleeping
Commit
·
02144c3
1
Parent(s):
9b457a9
Update app.py
Browse files
app.py
CHANGED
@@ -173,6 +173,8 @@ These tailored portfolios offer a range of investment strategies to suit differe
|
|
173 |
|
174 |
# LangChain function for company analysis
|
175 |
|
|
|
|
|
176 |
def company_analysis(api_key: str, company_name: str) -> dict:
|
177 |
|
178 |
os.environ['OPENAI_API_KEY'] = api_key # Set the OpenAI API key as an environment variable
|
@@ -698,9 +700,8 @@ with gr.Blocks() as demo:
|
|
698 |
outputs=[fig_cum_returns_optimized, weights_df, fig_efficient_frontier, fig_corr, \
|
699 |
expected_annual_return, annual_volatility, sharpe_ratio, fig_indiv_prices, fig_cum_returns])
|
700 |
|
701 |
-
|
702 |
|
703 |
-
with gr.Tab("Step 3:
|
704 |
gr.HTML(STEP2_TITLE)
|
705 |
run_button_crewai = gr.Button(value="Run", variant="primary", scale=1)
|
706 |
run_button_crewai.click(
|
@@ -709,7 +710,9 @@ with gr.Blocks() as demo:
|
|
709 |
outputs=gr.Textbox(label="Portfolio Analysis")
|
710 |
)
|
711 |
|
|
|
712 |
|
|
|
713 |
with gr.Tab("Company Analysis"):
|
714 |
gr.HTML(TITLE1)
|
715 |
run_button_analysis.click(
|
@@ -780,7 +783,7 @@ with gr.Blocks() as demo:
|
|
780 |
gr.Image(value = "resources/holder.png")
|
781 |
with gr.Column(scale=1):
|
782 |
gr.Image(value = "resources/holder.png")
|
783 |
-
|
784 |
|
785 |
|
786 |
demo.queue(max_size=99).launch(debug=False, show_error=True)
|
|
|
173 |
|
174 |
# LangChain function for company analysis
|
175 |
|
176 |
+
# For furture upgrade
|
177 |
+
|
178 |
def company_analysis(api_key: str, company_name: str) -> dict:
|
179 |
|
180 |
os.environ['OPENAI_API_KEY'] = api_key # Set the OpenAI API key as an environment variable
|
|
|
700 |
outputs=[fig_cum_returns_optimized, weights_df, fig_efficient_frontier, fig_corr, \
|
701 |
expected_annual_return, annual_volatility, sharpe_ratio, fig_indiv_prices, fig_cum_returns])
|
702 |
|
|
|
703 |
|
704 |
+
with gr.Tab("Step 3: Portfolio Analysis"):
|
705 |
gr.HTML(STEP2_TITLE)
|
706 |
run_button_crewai = gr.Button(value="Run", variant="primary", scale=1)
|
707 |
run_button_crewai.click(
|
|
|
710 |
outputs=gr.Textbox(label="Portfolio Analysis")
|
711 |
)
|
712 |
|
713 |
+
# For future upgrade
|
714 |
|
715 |
+
'''
|
716 |
with gr.Tab("Company Analysis"):
|
717 |
gr.HTML(TITLE1)
|
718 |
run_button_analysis.click(
|
|
|
783 |
gr.Image(value = "resources/holder.png")
|
784 |
with gr.Column(scale=1):
|
785 |
gr.Image(value = "resources/holder.png")
|
786 |
+
'''
|
787 |
|
788 |
|
789 |
demo.queue(max_size=99).launch(debug=False, show_error=True)
|