sebaxakerhtc
commited on
Fix rag.py
Browse files
src/synthetic_dataset_generator/apps/rag.py
CHANGED
@@ -678,39 +678,38 @@ with gr.Blocks() as app:
|
|
678 |
gr.HTML(value="<hr>")
|
679 |
gr.Markdown(value="## 2. Configure your task")
|
680 |
with gr.Row(equal_height=True):
|
681 |
-
with gr.
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
"Save", variant="primary"
|
707 |
-
)
|
708 |
-
with gr.Column(scale=3):
|
709 |
-
dataframe = gr.Dataframe(
|
710 |
-
headers=["context", "question", "response"],
|
711 |
-
wrap=True,
|
712 |
-
interactive=False,
|
713 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
|
715 |
gr.HTML(value="<hr>")
|
716 |
gr.Markdown(value="## 3. Generate your dataset")
|
|
|
678 |
gr.HTML(value="<hr>")
|
679 |
gr.Markdown(value="## 2. Configure your task")
|
680 |
with gr.Row(equal_height=True):
|
681 |
+
with gr.Column(scale=2):
|
682 |
+
system_prompt = gr.Textbox(
|
683 |
+
label="System prompt",
|
684 |
+
placeholder="You are a helpful assistant.",
|
685 |
+
visible=False,
|
686 |
+
)
|
687 |
+
document_column = gr.Dropdown(
|
688 |
+
label="Document Column",
|
689 |
+
info="Select the document column to generate the RAG dataset",
|
690 |
+
choices=["Load your data first in step 1."],
|
691 |
+
value="Load your data first in step 1.",
|
692 |
+
interactive=False,
|
693 |
+
multiselect=False,
|
694 |
+
allow_custom_value=False,
|
695 |
+
)
|
696 |
+
retrieval_reranking = gr.CheckboxGroup(
|
697 |
+
choices=[("Retrieval", "Retrieval"), ("Reranking", "Reranking")],
|
698 |
+
type="value",
|
699 |
+
label="Data for RAG",
|
700 |
+
info="Indicate the additional data you want to generate for RAG.",
|
701 |
+
)
|
702 |
+
with gr.Row():
|
703 |
+
clear_btn_full = gr.Button("Clear", variant="secondary")
|
704 |
+
btn_apply_to_sample_dataset = gr.Button(
|
705 |
+
"Save", variant="primary"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
706 |
)
|
707 |
+
with gr.Column(scale=3):
|
708 |
+
dataframe = gr.Dataframe(
|
709 |
+
headers=["context", "question", "response"],
|
710 |
+
wrap=True,
|
711 |
+
interactive=False,
|
712 |
+
)
|
713 |
|
714 |
gr.HTML(value="<hr>")
|
715 |
gr.Markdown(value="## 3. Generate your dataset")
|