sebaxakerhtc commited on
Commit
adec41e
·
unverified ·
1 Parent(s): 86547c9

Fix textcat.py

Browse files
src/synthetic_dataset_generator/apps/textcat.py CHANGED
@@ -459,61 +459,60 @@ with gr.Blocks() as app:
459
  gr.HTML("<hr>")
460
  gr.Markdown("## 2. Configure your dataset")
461
  with gr.Row(equal_height=True):
462
- with gr.Row(equal_height=False):
463
- with gr.Column(scale=2):
464
- system_prompt = gr.Textbox(
465
- label="System prompt",
466
- placeholder="You are a helpful assistant.",
467
- visible=True,
468
- )
469
- labels = gr.Dropdown(
470
- choices=[],
471
- allow_custom_value=True,
472
- interactive=True,
473
- label="Labels",
474
- multiselect=True,
475
- info="Add the labels to classify the text.",
476
- )
477
- multi_label = gr.Checkbox(
478
- label="Multi-label",
479
- value=False,
480
- interactive=True,
481
- info="If checked, the text will be classified into multiple labels.",
482
- )
483
- clarity = gr.Dropdown(
484
- choices=[
485
- ("Clear", "clear"),
486
- (
487
- "Understandable",
488
- "understandable with some effort",
489
- ),
490
- ("Ambiguous", "ambiguous"),
491
- ("Mixed", "mixed"),
492
- ],
493
- value="mixed",
494
- label="Clarity",
495
- info="Set how easily the correct label or labels can be identified.",
496
- interactive=True,
497
- )
498
- difficulty = gr.Dropdown(
499
- choices=[
500
- ("High School", "high school"),
501
- ("College", "college"),
502
- ("PhD", "PhD"),
503
- ("Mixed", "mixed"),
504
- ],
505
- value="high school",
506
- label="Difficulty",
507
- info="Select the comprehension level for the text. Ensure it matches the task context.",
508
- interactive=True,
 
 
 
 
509
  )
510
- with gr.Row():
511
- clear_btn_full = gr.Button("Clear", variant="secondary")
512
- btn_apply_to_sample_dataset = gr.Button(
513
- "Save", variant="primary"
514
- )
515
- with gr.Column(scale=3):
516
- dataframe = _get_dataframe()
517
 
518
  gr.HTML("<hr>")
519
  gr.Markdown("## 3. Generate your dataset")
 
459
  gr.HTML("<hr>")
460
  gr.Markdown("## 2. Configure your dataset")
461
  with gr.Row(equal_height=True):
462
+ with gr.Column(scale=2):
463
+ system_prompt = gr.Textbox(
464
+ label="System prompt",
465
+ placeholder="You are a helpful assistant.",
466
+ visible=True,
467
+ )
468
+ labels = gr.Dropdown(
469
+ choices=[],
470
+ allow_custom_value=True,
471
+ interactive=True,
472
+ label="Labels",
473
+ multiselect=True,
474
+ info="Add the labels to classify the text.",
475
+ )
476
+ multi_label = gr.Checkbox(
477
+ label="Multi-label",
478
+ value=False,
479
+ interactive=True,
480
+ info="If checked, the text will be classified into multiple labels.",
481
+ )
482
+ clarity = gr.Dropdown(
483
+ choices=[
484
+ ("Clear", "clear"),
485
+ (
486
+ "Understandable",
487
+ "understandable with some effort",
488
+ ),
489
+ ("Ambiguous", "ambiguous"),
490
+ ("Mixed", "mixed"),
491
+ ],
492
+ value="mixed",
493
+ label="Clarity",
494
+ info="Set how easily the correct label or labels can be identified.",
495
+ interactive=True,
496
+ )
497
+ difficulty = gr.Dropdown(
498
+ choices=[
499
+ ("High School", "high school"),
500
+ ("College", "college"),
501
+ ("PhD", "PhD"),
502
+ ("Mixed", "mixed"),
503
+ ],
504
+ value="high school",
505
+ label="Difficulty",
506
+ info="Select the comprehension level for the text. Ensure it matches the task context.",
507
+ interactive=True,
508
+ )
509
+ with gr.Row():
510
+ clear_btn_full = gr.Button("Clear", variant="secondary")
511
+ btn_apply_to_sample_dataset = gr.Button(
512
+ "Save", variant="primary"
513
  )
514
+ with gr.Column(scale=3):
515
+ dataframe = _get_dataframe()
 
 
 
 
 
516
 
517
  gr.HTML("<hr>")
518
  gr.Markdown("## 3. Generate your dataset")