Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import pandas as pd
|
|
5 |
|
6 |
from classifier import classify
|
7 |
from statistics import mean
|
|
|
8 |
|
9 |
|
10 |
HFTOKEN = os.environ["HF_TOKEN"]
|
@@ -175,7 +176,16 @@ with gr.Blocks() as demo:
|
|
175 |
|
176 |
with qa_tab:
|
177 |
# XXX Add some button disabling here, if the classification process is not completed first XXX
|
178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
gr.Markdown(
|
180 |
"""
|
181 |
# Question Answering Demo
|
|
|
5 |
|
6 |
from classifier import classify
|
7 |
from statistics import mean
|
8 |
+
from genra_incremental import GenraPipeline
|
9 |
|
10 |
|
11 |
HFTOKEN = os.environ["HF_TOKEN"]
|
|
|
176 |
|
177 |
with qa_tab:
|
178 |
# XXX Add some button disabling here, if the classification process is not completed first XXX
|
179 |
+
with gr.Accordion("Parameters", open="False"):
|
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
|