bstraehle commited on
Commit
32b17fe
·
verified ·
1 Parent(s): 5d22cf7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -3,14 +3,15 @@ import agentops, os
3
 
4
  from crew import get_crew
5
 
6
- agentops.init(os.environ["AGENTOPS_API_KEY"])
7
-
8
  def invoke(openai_api_key, topic):
9
  if (openai_api_key == ""):
10
  raise gr.Error("OpenAI API Key is required.")
11
  if (topic == ""):
12
  raise gr.Error("Topic is required.")
13
-
 
 
 
14
  os.environ["OPENAI_API_KEY"] = openai_api_key
15
 
16
  return get_crew().kickoff(inputs={"topic": topic})
 
3
 
4
  from crew import get_crew
5
 
 
 
6
  def invoke(openai_api_key, topic):
7
  if (openai_api_key == ""):
8
  raise gr.Error("OpenAI API Key is required.")
9
  if (topic == ""):
10
  raise gr.Error("Topic is required.")
11
+
12
+ agentops.init(os.environ["AGENTOPS_API_KEY"])
13
+ print(os.environ["AGENTOPS_API_KEY"])
14
+
15
  os.environ["OPENAI_API_KEY"] = openai_api_key
16
 
17
  return get_crew().kickoff(inputs={"topic": topic})