Lakoc commited on
Commit
af06d49
·
verified ·
1 Parent(s): 9f2e90d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -117,5 +117,15 @@ with gr.Blocks() as demo:
117
  # lambda: gr.update(visible=True),
118
  # outputs=modal
119
  # )
 
120
 
 
 
 
 
 
 
 
 
 
121
  demo.launch()
 
117
  # lambda: gr.update(visible=True),
118
  # outputs=modal
119
  # )
120
+ import os
121
 
122
+ def list_files(startpath):
123
+ for root, dirs, files in os.walk(startpath):
124
+ level = root.replace(startpath, '').count(os.sep)
125
+ indent = ' ' * 4 * (level)
126
+ print('{}{}/'.format(indent, os.path.basename(root)))
127
+ subindent = ' ' * 4 * (level + 1)
128
+ for f in files:
129
+ print('{}{}'.format(subindent, f))
130
+ list_files("./")
131
  demo.launch()