bstraehle commited on
Commit
780dce9
·
verified ·
1 Parent(s): cfbcfed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,9 +8,9 @@ lock = threading.Lock()
8
  LLM = "gpt-4o"
9
 
10
  def invoke(openai_api_key, topic):
11
- if (openai_api_key == ""):
12
  raise gr.Error("OpenAI API Key is required.")
13
- if (topic == ""):
14
  raise gr.Error("Topic is required.")
15
 
16
  agentops.init(os.environ["AGENTOPS_API_KEY"])
 
8
  LLM = "gpt-4o"
9
 
10
  def invoke(openai_api_key, topic):
11
+ if not openai_api_key:
12
  raise gr.Error("OpenAI API Key is required.")
13
+ if not topic:
14
  raise gr.Error("Topic is required.")
15
 
16
  agentops.init(os.environ["AGENTOPS_API_KEY"])