Spaces:
Runtime error
Runtime error
Update app_t.py
Browse files
app_t.py
CHANGED
|
@@ -9,18 +9,18 @@ extract_dir = "clipseg"
|
|
| 9 |
archive_format = "zip"
|
| 10 |
|
| 11 |
def main():
|
| 12 |
-
if path.exists(filename):
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
else:
|
| 22 |
-
|
| 23 |
-
|
| 24 |
|
| 25 |
if __name__=="__main__":
|
| 26 |
main()
|
|
|
|
| 9 |
archive_format = "zip"
|
| 10 |
|
| 11 |
def main():
|
| 12 |
+
if path.exists(filename):
|
| 13 |
+
print ("yes zip location exists.")
|
| 14 |
+
src=path.realpath(filename)
|
| 15 |
+
print("zip location:", src)
|
| 16 |
+
root_dir,tail = path.split(src)
|
| 17 |
+
extract_dir=root_dir+'/'+extract_dir
|
| 18 |
+
shutil.unpack_archive(filename, extract_dir, archive_format)
|
| 19 |
+
#shutil.make_archive("test","zip",root_dir)
|
| 20 |
+
print ("Archive file unpacked successfully.")
|
| 21 |
+
else:
|
| 22 |
+
print ("Archive file unpacked un-successfully.")
|
| 23 |
+
|
| 24 |
|
| 25 |
if __name__=="__main__":
|
| 26 |
main()
|