Ryan commited on
Commit
24a2114
·
1 Parent(s): 7303519
Files changed (2) hide show
  1. app.py +3 -0
  2. ui/dataset_input.py +2 -1
app.py CHANGED
@@ -63,6 +63,9 @@ def create_app():
63
 
64
  # Dataset Input Tab
65
  with gr.Tab("Dataset Input"):
 
 
 
66
  dataset_inputs, example_dropdown, load_example_btn, create_btn, prompt, response1, model1, response2, model2 = create_dataset_input()
67
 
68
  # Add status indicator to show when dataset is created
 
63
 
64
  # Dataset Input Tab
65
  with gr.Tab("Dataset Input"):
66
+ # Filter out files that start with 'summary' for the Dataset Input tab
67
+ dataset_files = [f for f in os.listdir("dataset")
68
+ if not f.startswith("summary-") and os.path.isfile(os.path.join("dataset", f))]
69
  dataset_inputs, example_dropdown, load_example_btn, create_btn, prompt, response1, model1, response2, model2 = create_dataset_input()
70
 
71
  # Add status indicator to show when dataset is created
ui/dataset_input.py CHANGED
@@ -13,8 +13,9 @@ def create_dataset_input():
13
  text_datasets_dir = os.path.join("dataset")
14
  # Check if directory exists
15
  if os.path.exists(text_datasets_dir):
 
16
  text_datasets = [file.name for file in os.scandir(text_datasets_dir)
17
- if file.is_file() and file.name.endswith(".txt")]
18
  else:
19
  # Create directory if it doesn't exist
20
  os.makedirs(text_datasets_dir, exist_ok=True)
 
13
  text_datasets_dir = os.path.join("dataset")
14
  # Check if directory exists
15
  if os.path.exists(text_datasets_dir):
16
+ # Filter out summary files when listing available datasets
17
  text_datasets = [file.name for file in os.scandir(text_datasets_dir)
18
+ if file.is_file() and file.name.endswith(".txt") and not file.name.startswith("summary-")]
19
  else:
20
  # Create directory if it doesn't exist
21
  os.makedirs(text_datasets_dir, exist_ok=True)