Lakoc commited on
Commit
3e5dbae
·
verified ·
1 Parent(s): af06d49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -11
app.py CHANGED
@@ -14,6 +14,7 @@ EXPECTED_TOKEN = os.environ.get("SUBMISSION_TOKEN")
14
 
15
  def get_datasets_for_task(task):
16
  path = os.path.join("references", task)
 
17
  if not os.path.exists(path):
18
  return []
19
  return [f.replace(".json", "") for f in os.listdir(path) if f.endswith(".json")]
@@ -117,15 +118,4 @@ with gr.Blocks() as demo:
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()
 
14
 
15
  def get_datasets_for_task(task):
16
  path = os.path.join("references", task)
17
+ print(path, os.path.exists(path))
18
  if not os.path.exists(path):
19
  return []
20
  return [f.replace(".json", "") for f in os.listdir(path) if f.endswith(".json")]
 
118
  # lambda: gr.update(visible=True),
119
  # outputs=modal
120
  # )
 
 
 
 
 
 
 
 
 
 
 
121
  demo.launch()