sebaxakerhtc
commited on
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.
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
|
|
|
|
|
|
|
|
509 |
)
|
510 |
-
|
511 |
-
|
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")
|