Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -176,16 +176,7 @@ with gr.Blocks() as demo:
|
|
| 176 |
|
| 177 |
with qa_tab:
|
| 178 |
# XXX Add some button disabling here, if the classification process is not completed first XXX
|
| 179 |
-
|
| 180 |
-
with gr.Row(equal_height=True):
|
| 181 |
-
with gr.Column():
|
| 182 |
-
qa_llm_model = gr.Dropdown(["mistral", "solar", "phi3mini"], label="QA model", value="phi3mini")
|
| 183 |
-
aggregator = gr.Dropdown(["linear", "outrank"], label="Aggregation method", value="linear")
|
| 184 |
-
|
| 185 |
-
with gr.Column():
|
| 186 |
-
batch_size = gr.Slider(50, 500, value=150, step=1, label="Batch size", info="Choose between 50 and 500")
|
| 187 |
-
topk = gr.Slider(1, 10, value=5, step=1, label="Number of results to retrieve", info="Choose between 1 and 10")
|
| 188 |
-
|
| 189 |
gr.Markdown(
|
| 190 |
"""
|
| 191 |
# Question Answering Demo
|
|
@@ -194,6 +185,17 @@ with gr.Blocks() as demo:
|
|
| 194 |
- Select queries from predefined\n
|
| 195 |
- Parameters for QA can be editted in sidebar\n
|
| 196 |
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 197 |
selected_queries = gr.CheckboxGroup(label="Select at least one query using the checkboxes", interactive=True)
|
| 198 |
queries_state = gr.State()
|
| 199 |
qa_tab.select(init_queries, inputs=queries_state, outputs=[selected_queries, queries_state])
|
|
|
|
| 176 |
|
| 177 |
with qa_tab:
|
| 178 |
# XXX Add some button disabling here, if the classification process is not completed first XXX
|
| 179 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
gr.Markdown(
|
| 181 |
"""
|
| 182 |
# Question Answering Demo
|
|
|
|
| 185 |
- Select queries from predefined\n
|
| 186 |
- Parameters for QA can be editted in sidebar\n
|
| 187 |
""")
|
| 188 |
+
|
| 189 |
+
with gr.Accordion("Parameters", open=False):
|
| 190 |
+
with gr.Row(equal_height=True):
|
| 191 |
+
with gr.Column():
|
| 192 |
+
qa_llm_model = gr.Dropdown(["mistral", "solar", "phi3mini"], label="QA model", value="phi3mini", interactive=True)
|
| 193 |
+
aggregator = gr.Dropdown(["linear", "outrank"], label="Aggregation method", value="linear", interactive=True)
|
| 194 |
+
|
| 195 |
+
with gr.Column():
|
| 196 |
+
batch_size = gr.Slider(50, 500, value=150, step=1, label="Batch size", info="Choose between 50 and 500", interactive=True)
|
| 197 |
+
topk = gr.Slider(1, 10, value=5, step=1, label="Number of results to retrieve", info="Choose between 1 and 10", interactive=True)
|
| 198 |
+
|
| 199 |
selected_queries = gr.CheckboxGroup(label="Select at least one query using the checkboxes", interactive=True)
|
| 200 |
queries_state = gr.State()
|
| 201 |
qa_tab.select(init_queries, inputs=queries_state, outputs=[selected_queries, queries_state])
|