amqdn commited on
Commit
374915b
1 Parent(s): d171bdb

update janky api key condition

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,9 +14,9 @@ text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0, separato
14
  texts = text_splitter.split_text(hitchhikersguide)
15
 
16
  def get_api_key(input_1, input_2):
17
- if len(input_1) > 0:
18
  os.environ['OPENAI_API_KEY'] = input_1
19
- elif len(input_2) > 0:
20
  os.environ['OPENAI_API_KEY'] = input_2
21
  return True
22
 
 
14
  texts = text_splitter.split_text(hitchhikersguide)
15
 
16
  def get_api_key(input_1, input_2):
17
+ if len(input_1) >= len(input_2):
18
  os.environ['OPENAI_API_KEY'] = input_1
19
+ else:
20
  os.environ['OPENAI_API_KEY'] = input_2
21
  return True
22