abidlabs HF Staff commited on
Commit
0e55f17
·
1 Parent(s): 96a1566

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -11,6 +11,10 @@ def print_flagged_dir_and_csv(x):
11
  subindent = ' ' * 4 * (level + 1)
12
  for f in files:
13
  dirtree += '{}{}\n'.format(subindent, f)
14
- return dirtree, "flagged/log.csv"
 
 
 
 
15
 
16
  gr.Interface(print_flagged_dir_and_csv, "textbox", ["textbox", "file"]).launch()
 
11
  subindent = ' ' * 4 * (level + 1)
12
  for f in files:
13
  dirtree += '{}{}\n'.format(subindent, f)
14
+ if os.path.exists("flagged/log.csv"):
15
+ file = "flagged/log.csv"
16
+ else:
17
+ file = None
18
+ return dirtree, file
19
 
20
  gr.Interface(print_flagged_dir_and_csv, "textbox", ["textbox", "file"]).launch()