Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -90,29 +90,6 @@ def download_gitlab_repo():
|
|
90 |
)
|
91 |
print("Upload complete")
|
92 |
|
93 |
-
|
94 |
-
#def extract_single_zip_file(directory):
|
95 |
-
zip_files = [file for file in os.listdir(directory) if file.endswith('.zip')]
|
96 |
-
|
97 |
-
if not zip_files:
|
98 |
-
print("No zip file found in the directory.")
|
99 |
-
|
100 |
-
if len(zip_files) > 1:
|
101 |
-
print("More than one zip file found.")
|
102 |
-
return
|
103 |
-
else:
|
104 |
-
zip_file_path = os.path.join(directory, zip_files[0])
|
105 |
-
|
106 |
-
# Create a temporary directory for the zip file
|
107 |
-
with tempfile.TemporaryDirectory() as tmpdirname:
|
108 |
-
# Unzip the file into the temporary directory
|
109 |
-
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
|
110 |
-
zip_ref.extractall(tmpdirname)
|
111 |
-
print(f"Extracted {zip_file_path} to {tmpdirname}")
|
112 |
-
return tmpdirname
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
def process_directory(directory):
|
117 |
all_texts = []
|
118 |
file_references = []
|
|
|
90 |
)
|
91 |
print("Upload complete")
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
def process_directory(directory):
|
94 |
all_texts = []
|
95 |
file_references = []
|