Spaces:
Runtime error
Runtime error
Commit ·
f1cd23d
1
Parent(s): 02f4b5e
Update app.py
Browse files
app.py
CHANGED
|
@@ -326,16 +326,24 @@ def upload_file(chatbot_history,file_uploaded):
|
|
| 326 |
|
| 327 |
def clear_chat_history(history:list)->list:
|
| 328 |
history.clear()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 329 |
storing_folder = pathlib.Path('/tmp/')
|
| 330 |
for file in storing_folder.iterdir():
|
| 331 |
if file.is_file():
|
|
|
|
| 332 |
file.unlink()
|
|
|
|
| 333 |
|
| 334 |
-
global EMBEDIDNGS
|
| 335 |
-
EMBEDIDNGS = None
|
| 336 |
|
| 337 |
-
global DATAFRAME_FILE
|
| 338 |
-
DATAFRAME_FILE = None
|
| 339 |
return history
|
| 340 |
|
| 341 |
|
|
|
|
| 326 |
|
| 327 |
def clear_chat_history(history:list)->list:
|
| 328 |
history.clear()
|
| 329 |
+
global EMBEDIDNGS
|
| 330 |
+
EMBEDIDNGS = None
|
| 331 |
+
|
| 332 |
+
global DATAFRAME_FILE
|
| 333 |
+
DATAFRAME_FILE = None
|
| 334 |
+
|
| 335 |
storing_folder = pathlib.Path('/tmp/')
|
| 336 |
for file in storing_folder.iterdir():
|
| 337 |
if file.is_file():
|
| 338 |
+
print(f'{file} to be deleted')
|
| 339 |
file.unlink()
|
| 340 |
+
print(f'{file} deleted')
|
| 341 |
|
| 342 |
+
# global EMBEDIDNGS
|
| 343 |
+
# EMBEDIDNGS = None
|
| 344 |
|
| 345 |
+
# global DATAFRAME_FILE
|
| 346 |
+
# DATAFRAME_FILE = None
|
| 347 |
return history
|
| 348 |
|
| 349 |
|