Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,11 +14,13 @@ import time
|
|
| 14 |
from openai import OpenAI
|
| 15 |
import sys
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
print(
|
|
|
|
|
|
|
| 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 |
|