NikosKprl commited on
Commit
f0be77b
·
verified ·
1 Parent(s): 7e03ab7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -14,11 +14,13 @@ import time
14
  from openai import OpenAI
15
  import sys
16
 
17
- current_directory = os.getcwd()
18
 
19
- files = os.listdir(current_directory)
20
-
21
- print(files)
 
 
22
 
23
  model = SentenceTransformer("Lajavaness/bilingual-embedding-large", trust_remote_code=True)
24
 
@@ -147,7 +149,7 @@ async def mains(name, single, combi):
147
  pass
148
 
149
  # Save QIDs to file
150
- with open(f"qids_folder/{name}.json", "w") as f:
151
  json.dump(list(qids), f)
152
 
153
 
 
14
  from openai import OpenAI
15
  import sys
16
 
17
+ folder_path = '/home/user/app/qids_folder'
18
 
19
+ if not os.path.exists(folder_path):
20
+ os.mkdir(folder_path)
21
+ print(f"Folder 'qids_folder' created at {folder_path}")
22
+ else:
23
+ print(f"Folder 'qids_folder' already exists.")
24
 
25
  model = SentenceTransformer("Lajavaness/bilingual-embedding-large", trust_remote_code=True)
26
 
 
149
  pass
150
 
151
  # Save QIDs to file
152
+ with open(f"/home/user/app/qids_folder/{name}.json", "w") as f:
153
  json.dump(list(qids), f)
154
 
155