Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
-
import os
|
3 |
|
4 |
from crew import get_financial_trading_crew
|
5 |
|
|
|
|
|
|
|
|
|
|
|
6 |
def invoke(openai_api_key, serper_api_key, stock_selection, initial_capital, risk_tolerance, trading_strategy_preference, news_impact_consideration):
|
7 |
if (openai_api_key == ""):
|
8 |
raise gr.Error("OpenAI API Key is required.")
|
@@ -29,8 +34,6 @@ def invoke(openai_api_key, serper_api_key, stock_selection, initial_capital, ris
|
|
29 |
"trading_strategy_preference": trading_strategy_preference,
|
30 |
"news_impact_consideration": news_impact_consideration
|
31 |
}
|
32 |
-
|
33 |
-
print(financial_trading_inputs)
|
34 |
|
35 |
return get_financial_trading_crew().kickoff(inputs=financial_trading_inputs)
|
36 |
|
|
|
1 |
import gradio as gr
|
2 |
+
import agentops, os
|
3 |
|
4 |
from crew import get_financial_trading_crew
|
5 |
|
6 |
+
AGENTOPS_API_KEY=<YOUR_AGENTOPS_API_KEY>
|
7 |
+
|
8 |
+
agentops.init()
|
9 |
+
|
10 |
+
|
11 |
def invoke(openai_api_key, serper_api_key, stock_selection, initial_capital, risk_tolerance, trading_strategy_preference, news_impact_consideration):
|
12 |
if (openai_api_key == ""):
|
13 |
raise gr.Error("OpenAI API Key is required.")
|
|
|
34 |
"trading_strategy_preference": trading_strategy_preference,
|
35 |
"news_impact_consideration": news_impact_consideration
|
36 |
}
|
|
|
|
|
37 |
|
38 |
return get_financial_trading_crew().kickoff(inputs=financial_trading_inputs)
|
39 |
|