Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,9 @@
|
|
| 1 |
import os
|
| 2 |
import zipfile
|
| 3 |
|
|
|
|
|
|
|
|
|
|
| 4 |
# Define the filename
|
| 5 |
zip_filename = 'Images.zip'
|
| 6 |
|
|
@@ -34,6 +37,17 @@ else:
|
|
| 34 |
# Print the contents of the current directory after unzipping
|
| 35 |
print(f"Contents of current directory after unzipping: {os.listdir(current_directory)}")
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
import gradio as gr
|
| 38 |
import gc
|
| 39 |
import cv2
|
|
|
|
| 1 |
import os
|
| 2 |
import zipfile
|
| 3 |
|
| 4 |
+
import os
|
| 5 |
+
import zipfile
|
| 6 |
+
|
| 7 |
# Define the filename
|
| 8 |
zip_filename = 'Images.zip'
|
| 9 |
|
|
|
|
| 37 |
# Print the contents of the current directory after unzipping
|
| 38 |
print(f"Contents of current directory after unzipping: {os.listdir(current_directory)}")
|
| 39 |
|
| 40 |
+
# Code to list the contents in the application (e.g., web interface)
|
| 41 |
+
def list_unzipped_contents():
|
| 42 |
+
unzipped_contents = os.listdir(custom_directory)
|
| 43 |
+
print(f"Unzipped contents: {unzipped_contents}")
|
| 44 |
+
return unzipped_contents
|
| 45 |
+
|
| 46 |
+
# Call the function to list unzipped contents (this part should be integrated with your app's display logic)
|
| 47 |
+
unzipped_files = list_unzipped_contents()
|
| 48 |
+
# Integrate `unzipped_files` with your app's interface to display the contents
|
| 49 |
+
|
| 50 |
+
|
| 51 |
import gradio as gr
|
| 52 |
import gc
|
| 53 |
import cv2
|