sebaxakerhtc commited on
Commit
43c881a
·
unverified ·
1 Parent(s): adec41e

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.Row(equal_height=False):
682
- with gr.Column(scale=2):
683
- system_prompt = gr.Textbox(
684
- label="System prompt",
685
- placeholder="You are a helpful assistant.",
686
- visible=False,
687
- )
688
- document_column = gr.Dropdown(
689
- label="Document Column",
690
- info="Select the document column to generate the RAG dataset",
691
- choices=["Load your data first in step 1."],
692
- value="Load your data first in step 1.",
693
- interactive=False,
694
- multiselect=False,
695
- allow_custom_value=False,
696
- )
697
- retrieval_reranking = gr.CheckboxGroup(
698
- choices=[("Retrieval", "Retrieval"), ("Reranking", "Reranking")],
699
- type="value",
700
- label="Data for RAG",
701
- info="Indicate the additional data you want to generate for RAG.",
702
- )
703
- with gr.Row():
704
- clear_btn_full = gr.Button("Clear", variant="secondary")
705
- btn_apply_to_sample_dataset = gr.Button(
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")