Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,6 +26,11 @@ os.environ['GRADIO_TEMP_DIR'] = new_directory_path
|
|
| 26 |
|
| 27 |
######
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
def create():
|
| 30 |
"""
|
| 31 |
Create a blank image with the specified dimensions, color, and filename.
|
|
@@ -46,16 +51,11 @@ def create():
|
|
| 46 |
# Specify the directory you want to search in, e.g., the current directory
|
| 47 |
directory = 'temp_dir'
|
| 48 |
# List all entries in the directory
|
| 49 |
-
entries = os.listdir(directory)
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
print(
|
| 53 |
-
|
| 54 |
-
print(d)
|
| 55 |
-
hidden_directories_listing = os.listdir(d)
|
| 56 |
-
print(os.listdir(d))
|
| 57 |
-
print("-------------------------------")
|
| 58 |
-
return temp_file.name, hidden_directories_listing
|
| 59 |
|
| 60 |
|
| 61 |
with gr.Blocks(delete_cache=(2,2),
|
|
|
|
| 26 |
|
| 27 |
######
|
| 28 |
|
| 29 |
+
# Get the path of the system's temporary directory
|
| 30 |
+
temp_directory = tempfile.gettempdir()
|
| 31 |
+
print(f"System's temporary directory is: {temp_directory}")
|
| 32 |
+
|
| 33 |
+
|
| 34 |
def create():
|
| 35 |
"""
|
| 36 |
Create a blank image with the specified dimensions, color, and filename.
|
|
|
|
| 51 |
# Specify the directory you want to search in, e.g., the current directory
|
| 52 |
directory = 'temp_dir'
|
| 53 |
# List all entries in the directory
|
| 54 |
+
entries = os.listdir(directory)
|
| 55 |
+
print(f"listdir of temp_dir directory = {entries}")
|
| 56 |
+
temp_directory_file_list = os.listdir(temp_directory)
|
| 57 |
+
print(f'temp_directory_file_list is = {temp_directory_file_list}')
|
| 58 |
+
return temp_file.name, temp_directory_file_list
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
|
| 61 |
with gr.Blocks(delete_cache=(2,2),
|