Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
|
|
2 |
import os
|
3 |
import random
|
4 |
import string
|
|
|
5 |
|
6 |
def generate_random_string(length=100):
|
7 |
"""Generate a random string of fixed length."""
|
@@ -22,6 +23,8 @@ for i in range(num_files):
|
|
22 |
f.write(generate_random_string() + '\n')
|
23 |
|
24 |
print(os.listdir("/data"))
|
|
|
|
|
25 |
|
26 |
with gr.Blocks() as demo:
|
27 |
gr.FileExplorer()
|
|
|
2 |
import os
|
3 |
import random
|
4 |
import string
|
5 |
+
import glob
|
6 |
|
7 |
def generate_random_string(length=100):
|
8 |
"""Generate a random string of fixed length."""
|
|
|
23 |
f.write(generate_random_string() + '\n')
|
24 |
|
25 |
print(os.listdir("/data"))
|
26 |
+
print(glob.glob("**.*"))
|
27 |
+
print(glob.glob("**.*", root_dir="/data"))
|
28 |
|
29 |
with gr.Blocks() as demo:
|
30 |
gr.FileExplorer()
|