sdiazlor HF staff commited on
Commit
45693e1
1 Parent(s): 7350fc6

update text and order parameter layout

Browse files
src/distilabel_dataset_generator/apps/sft.py CHANGED
@@ -361,7 +361,7 @@ with gr.Blocks(css=_LOGGED_OUT_CSS) as app:
361
  placeholder="Give a precise description of your desired dataset.",
362
  )
363
  load_btn = gr.Button(
364
- "Load dataset",
365
  variant="primary",
366
  )
367
  with gr.Column(scale=2):
@@ -369,13 +369,13 @@ with gr.Blocks(css=_LOGGED_OUT_CSS) as app:
369
  examples=DEFAULT_DATASET_DESCRIPTIONS,
370
  inputs=[dataset_description],
371
  cache_examples=False,
372
- label="Example descriptions",
373
  )
374
  with gr.Column(scale=1):
375
  pass
376
 
377
  gr.HTML(value="<hr>")
378
- gr.Markdown(value="## 2. Configure your task")
379
  with gr.Row(equal_height=False):
380
  with gr.Column(scale=1):
381
  system_prompt = gr.Textbox(
@@ -391,7 +391,9 @@ with gr.Blocks(css=_LOGGED_OUT_CSS) as app:
391
  interactive=True,
392
  info="Choose between 1 (single turn with 'instruction-response' columns) and 2-4 (multi-turn conversation with a 'messages' column).",
393
  )
394
- btn_apply_to_sample_dataset = gr.Button("Refresh dataset")
 
 
395
  with gr.Column(scale=3):
396
  dataframe = gr.Dataframe(
397
  headers=["prompt", "completion"], wrap=True, height=300
 
361
  placeholder="Give a precise description of your desired dataset.",
362
  )
363
  load_btn = gr.Button(
364
+ "Create dataset",
365
  variant="primary",
366
  )
367
  with gr.Column(scale=2):
 
369
  examples=DEFAULT_DATASET_DESCRIPTIONS,
370
  inputs=[dataset_description],
371
  cache_examples=False,
372
+ label="Examples",
373
  )
374
  with gr.Column(scale=1):
375
  pass
376
 
377
  gr.HTML(value="<hr>")
378
+ gr.Markdown(value="## 2. Configure your dataset")
379
  with gr.Row(equal_height=False):
380
  with gr.Column(scale=1):
381
  system_prompt = gr.Textbox(
 
391
  interactive=True,
392
  info="Choose between 1 (single turn with 'instruction-response' columns) and 2-4 (multi-turn conversation with a 'messages' column).",
393
  )
394
+ btn_apply_to_sample_dataset = gr.Button(
395
+ "Refresh dataset", variant="secondary", size="sm"
396
+ )
397
  with gr.Column(scale=3):
398
  dataframe = gr.Dataframe(
399
  headers=["prompt", "completion"], wrap=True, height=300
src/distilabel_dataset_generator/apps/textcat.py CHANGED
@@ -369,7 +369,7 @@ with gr.Blocks(css=_LOGGED_OUT_CSS) as app:
369
  placeholder="Give a precise description of your desired dataset.",
370
  )
371
  load_btn = gr.Button(
372
- "Load dataset",
373
  variant="primary",
374
  )
375
  with gr.Column(scale=2):
@@ -377,13 +377,13 @@ with gr.Blocks(css=_LOGGED_OUT_CSS) as app:
377
  examples=DEFAULT_DATASET_DESCRIPTIONS,
378
  inputs=[dataset_description],
379
  cache_examples=False,
380
- label="Example descriptions",
381
  )
382
  with gr.Column(scale=1):
383
  pass
384
 
385
  gr.HTML("<hr>")
386
- gr.Markdown("## 2. Configure your task")
387
  with gr.Row(equal_height=False):
388
  with gr.Column(scale=1):
389
  system_prompt = gr.Textbox(
@@ -391,16 +391,20 @@ with gr.Blocks(css=_LOGGED_OUT_CSS) as app:
391
  placeholder="You are a helpful assistant.",
392
  visible=True,
393
  )
394
- difficulty = gr.Dropdown(
395
- choices=[
396
- ("High School", "high school"),
397
- ("College", "college"),
398
- ("PhD", "PhD"),
399
- ("Mixed", "mixed"),
400
- ],
401
- value="mixed",
402
- label="Difficulty",
403
- info="Select the comprehension level for the text. Ensure it matches the task context.",
 
 
 
 
404
  interactive=True,
405
  )
406
  clarity = gr.Dropdown(
@@ -418,23 +422,21 @@ with gr.Blocks(css=_LOGGED_OUT_CSS) as app:
418
  info="Set how easily the correct label or labels can be identified.",
419
  interactive=True,
420
  )
421
- labels = gr.Dropdown(
422
- choices=[],
423
- allow_custom_value=True,
 
 
 
 
 
 
 
424
  interactive=True,
425
- label="Labels",
426
- multiselect=True,
427
- info="Add the labels to classify the text.",
428
  )
429
- num_labels = gr.Number(
430
- label="Number of labels per text",
431
- value=1,
432
- minimum=1,
433
- maximum=10,
434
- info="Select 1 for single-label and >1 for multi-label.",
435
- interactive=True,
436
  )
437
- btn_apply_to_sample_dataset = gr.Button("Refresh dataset")
438
  with gr.Column(scale=3):
439
  dataframe = gr.Dataframe(
440
  headers=["labels", "text"], wrap=True, height=300, column_widths=[1, 3]
 
369
  placeholder="Give a precise description of your desired dataset.",
370
  )
371
  load_btn = gr.Button(
372
+ "Create dataset",
373
  variant="primary",
374
  )
375
  with gr.Column(scale=2):
 
377
  examples=DEFAULT_DATASET_DESCRIPTIONS,
378
  inputs=[dataset_description],
379
  cache_examples=False,
380
+ label="Examples",
381
  )
382
  with gr.Column(scale=1):
383
  pass
384
 
385
  gr.HTML("<hr>")
386
+ gr.Markdown("## 2. Configure your dataset")
387
  with gr.Row(equal_height=False):
388
  with gr.Column(scale=1):
389
  system_prompt = gr.Textbox(
 
391
  placeholder="You are a helpful assistant.",
392
  visible=True,
393
  )
394
+ labels = gr.Dropdown(
395
+ choices=[],
396
+ allow_custom_value=True,
397
+ interactive=True,
398
+ label="Labels",
399
+ multiselect=True,
400
+ info="Add the labels to classify the text.",
401
+ )
402
+ num_labels = gr.Number(
403
+ label="Number of labels per text",
404
+ value=1,
405
+ minimum=1,
406
+ maximum=10,
407
+ info="Select 1 for single-label and >1 for multi-label.",
408
  interactive=True,
409
  )
410
  clarity = gr.Dropdown(
 
422
  info="Set how easily the correct label or labels can be identified.",
423
  interactive=True,
424
  )
425
+ difficulty = gr.Dropdown(
426
+ choices=[
427
+ ("High School", "high school"),
428
+ ("College", "college"),
429
+ ("PhD", "PhD"),
430
+ ("Mixed", "mixed"),
431
+ ],
432
+ value="mixed",
433
+ label="Difficulty",
434
+ info="Select the comprehension level for the text. Ensure it matches the task context.",
435
  interactive=True,
 
 
 
436
  )
437
+ btn_apply_to_sample_dataset = gr.Button(
438
+ "Refresh dataset", variant="secondary", size="sm"
 
 
 
 
 
439
  )
 
440
  with gr.Column(scale=3):
441
  dataframe = gr.Dataframe(
442
  headers=["labels", "text"], wrap=True, height=300, column_widths=[1, 3]