Spaces:
Running
Running
update
Browse files- app.py +2 -1
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -45,7 +45,7 @@ with open('agent_no_image_new_lib.prompt', 'r') as f:
|
|
| 45 |
|
| 46 |
import glob
|
| 47 |
import time
|
| 48 |
-
|
| 49 |
def list_files_in_directory(directory):
|
| 50 |
"""Lists all files in the given directory."""
|
| 51 |
return set(glob.glob(os.path.join(directory, "*")))
|
|
@@ -55,6 +55,7 @@ def cleanup_temp_files(temp_files):
|
|
| 55 |
for temp_file in temp_files:
|
| 56 |
try:
|
| 57 |
if os.path.exists(temp_file):
|
|
|
|
| 58 |
os.remove(temp_file)
|
| 59 |
print(f"Deleted temporary file: {temp_file}")
|
| 60 |
except Exception as e:
|
|
|
|
| 45 |
|
| 46 |
import glob
|
| 47 |
import time
|
| 48 |
+
import shutil
|
| 49 |
def list_files_in_directory(directory):
|
| 50 |
"""Lists all files in the given directory."""
|
| 51 |
return set(glob.glob(os.path.join(directory, "*")))
|
|
|
|
| 55 |
for temp_file in temp_files:
|
| 56 |
try:
|
| 57 |
if os.path.exists(temp_file):
|
| 58 |
+
shutil.rmtree(temp_file)
|
| 59 |
os.remove(temp_file)
|
| 60 |
print(f"Deleted temporary file: {temp_file}")
|
| 61 |
except Exception as e:
|
requirements.txt
CHANGED
|
@@ -7,5 +7,5 @@ colormath
|
|
| 7 |
scipy
|
| 8 |
matplotlib
|
| 9 |
chromedriver_py
|
| 10 |
-
|
| 11 |
transformers
|
|
|
|
| 7 |
scipy
|
| 8 |
matplotlib
|
| 9 |
chromedriver_py
|
| 10 |
+
bing-image-downloader==1.1.2
|
| 11 |
transformers
|