Spaces:
Sleeping
Sleeping
update janky api key condition
Browse files
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)
|
18 |
os.environ['OPENAI_API_KEY'] = input_1
|
19 |
-
|
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 |
|