bstraehle commited on
Commit
c74f41d
1 Parent(s): 32b17fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- import agentops, os
3
 
4
  from crew import get_crew
5
 
@@ -8,12 +8,11 @@ def invoke(openai_api_key, topic):
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})
18
 
19
  description = """<a href='https://www.gradio.app/'>Gradio</a> UI using the <a href='https://openai.com/'>OpenAI</a> SDK
 
1
  import gradio as gr
2
+ import agentops, openai, os
3
 
4
  from crew import get_crew
5
 
 
8
  raise gr.Error("OpenAI API Key is required.")
9
  if (topic == ""):
10
  raise gr.Error("Topic is required.")
11
+
 
 
 
12
  os.environ["OPENAI_API_KEY"] = openai_api_key
13
 
14
+ agentops.init(os.environ["AGENTOPS_API_KEY"])
15
+
16
  return get_crew().kickoff(inputs={"topic": topic})
17
 
18
  description = """<a href='https://www.gradio.app/'>Gradio</a> UI using the <a href='https://openai.com/'>OpenAI</a> SDK