davidberenstein1957 HF staff commited on
Commit
5829740
1 Parent(s): cb13241

fix: repo id org and name must be defined

Browse files
src/distilabel_dataset_generator/apps/sft.py CHANGED
@@ -75,7 +75,7 @@ def generate_dataset(
75
  else None
76
  )
77
  if repo_id is not None:
78
- if not repo_id:
79
  raise gr.Error(
80
  "Please provide a repo_name and org_name to push the dataset to."
81
  )
@@ -84,9 +84,9 @@ def generate_dataset(
84
  num_turns = 4
85
  gr.Info("You can only generate a dataset with 4 or fewer turns. Setting to 4.")
86
  if num_rows > 5000:
87
- num_rows = 5000
88
  gr.Info(
89
- "You can only generate a dataset with 5000 or fewer rows. Setting to 5000."
90
  )
91
 
92
  if num_rows < 10:
@@ -236,7 +236,7 @@ with gr.Blocks(
236
  value=100,
237
  label="Number of rows in the dataset",
238
  minimum=1,
239
- maximum=5000,
240
  info="The number of rows in the dataset. Note that you are able to generate more rows at once but that this will take time.",
241
  )
242
 
 
75
  else None
76
  )
77
  if repo_id is not None:
78
+ if not all([repo_id, org_name, repo_name]):
79
  raise gr.Error(
80
  "Please provide a repo_name and org_name to push the dataset to."
81
  )
 
84
  num_turns = 4
85
  gr.Info("You can only generate a dataset with 4 or fewer turns. Setting to 4.")
86
  if num_rows > 5000:
87
+ num_rows = 1000
88
  gr.Info(
89
+ "You can only generate a dataset with 1000 or fewer rows. Setting to 1000."
90
  )
91
 
92
  if num_rows < 10:
 
236
  value=100,
237
  label="Number of rows in the dataset",
238
  minimum=1,
239
+ maximum=1000,
240
  info="The number of rows in the dataset. Note that you are able to generate more rows at once but that this will take time.",
241
  )
242