Spaces:
Sleeping
Sleeping
Clémentine
commited on
Commit
·
be6a58f
1
Parent(s):
1a6cc70
small viz change
Browse files- yourbench_space/app.py +45 -46
yourbench_space/app.py
CHANGED
@@ -143,21 +143,20 @@ with gr.Blocks(theme=gr.themes.Default()) as app:
|
|
143 |
with gr.Tabs() as tabs:
|
144 |
with gr.Tab("Setup", id=0):
|
145 |
with gr.Row():
|
146 |
-
with gr.
|
147 |
login_btn = gr.LoginButton()
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
)
|
155 |
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
|
162 |
with gr.Accordion("Upload documents"):
|
163 |
file_input = gr.File(
|
@@ -171,12 +170,12 @@ with gr.Blocks(theme=gr.themes.Default()) as app:
|
|
171 |
file_input,
|
172 |
output,
|
173 |
)
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
|
181 |
file_input.change(enable_button, inputs=file_input, outputs=preview_button)
|
182 |
|
@@ -190,7 +189,7 @@ with gr.Blocks(theme=gr.themes.Default()) as app:
|
|
190 |
inputs=None,
|
191 |
outputs=tabs,
|
192 |
)
|
193 |
-
|
194 |
with gr.Tab("Run Generation", id=1):
|
195 |
with gr.Row():
|
196 |
start_button = gr.Button("Start Task")
|
@@ -202,40 +201,40 @@ with gr.Blocks(theme=gr.themes.Default()) as app:
|
|
202 |
kill_button = gr.Button("Kill Task")
|
203 |
kill_button.click(manager.kill_process)
|
204 |
|
205 |
-
|
206 |
-
|
|
|
207 |
with gr.Accordion("Log Output", open=True):
|
208 |
log_output = gr.Code(language=None, lines=20, interactive=False)
|
209 |
|
210 |
-
with gr.Row():
|
211 |
process_status = gr.Checkbox(label="Process Status", interactive=False)
|
212 |
status_timer = gr.Timer(1.0, active=True)
|
213 |
status_timer.tick(update_process_status, outputs=process_status)
|
214 |
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
|
240 |
log_timer = gr.Timer(1.0, active=True)
|
241 |
log_timer.tick(
|
|
|
143 |
with gr.Tabs() as tabs:
|
144 |
with gr.Tab("Setup", id=0):
|
145 |
with gr.Row():
|
146 |
+
with gr.Accordion("Hugging Face Settings"):
|
147 |
login_btn = gr.LoginButton()
|
148 |
+
hf_org_dropdown = gr.Dropdown(
|
149 |
+
choices=[], label="Organization", allow_custom_value=True
|
150 |
+
)
|
151 |
+
app.load(
|
152 |
+
update_hf_org_dropdown, inputs=None, outputs=hf_org_dropdown
|
153 |
+
)
|
|
|
154 |
|
155 |
+
hf_dataset_name = gr.Textbox(
|
156 |
+
label="Dataset name",
|
157 |
+
value="yourbench",
|
158 |
+
info="Name of your new evaluation dataset",
|
159 |
+
)
|
160 |
|
161 |
with gr.Accordion("Upload documents"):
|
162 |
file_input = gr.File(
|
|
|
170 |
file_input,
|
171 |
output,
|
172 |
)
|
173 |
+
|
174 |
+
preview_button = gr.Button("Generate New Config", interactive=False)
|
175 |
+
log_message = gr.Textbox(label="Log Message", visible=True)
|
176 |
+
download_button = gr.File(
|
177 |
+
label="Download Config", visible=False, interactive=False
|
178 |
+
)
|
179 |
|
180 |
file_input.change(enable_button, inputs=file_input, outputs=preview_button)
|
181 |
|
|
|
189 |
inputs=None,
|
190 |
outputs=tabs,
|
191 |
)
|
192 |
+
|
193 |
with gr.Tab("Run Generation", id=1):
|
194 |
with gr.Row():
|
195 |
start_button = gr.Button("Start Task")
|
|
|
201 |
kill_button = gr.Button("Kill Task")
|
202 |
kill_button.click(manager.kill_process)
|
203 |
|
204 |
+
|
205 |
+
with gr.Row():
|
206 |
+
with gr.Column():
|
207 |
with gr.Accordion("Log Output", open=True):
|
208 |
log_output = gr.Code(language=None, lines=20, interactive=False)
|
209 |
|
|
|
210 |
process_status = gr.Checkbox(label="Process Status", interactive=False)
|
211 |
status_timer = gr.Timer(1.0, active=True)
|
212 |
status_timer.tick(update_process_status, outputs=process_status)
|
213 |
|
214 |
+
with gr.Column():
|
215 |
+
with gr.Accordion("Stages", open=True):
|
216 |
+
stages_table = gr.CheckboxGroup(
|
217 |
+
choices=STAGES,
|
218 |
+
value=[],
|
219 |
+
label="Pipeline Stages Completed",
|
220 |
+
interactive=False,
|
221 |
+
)
|
222 |
|
223 |
+
with gr.Accordion("Ingestion"):
|
224 |
+
ingestion_df = gr.DataFrame()
|
225 |
+
|
226 |
+
with gr.Accordion("Summarization"):
|
227 |
+
summarization_df = gr.DataFrame()
|
228 |
+
|
229 |
+
with gr.Accordion("Single-Hop"):
|
230 |
+
single_hop = gr.DataFrame()
|
231 |
+
|
232 |
+
with gr.Accordion("Answer Generation"):
|
233 |
+
answers_df = gr.DataFrame()
|
234 |
+
|
235 |
+
stages_table.change(
|
236 |
+
update_dataset, inputs=[stages_table, hf_org_dropdown, hf_dataset_name], outputs=[ingestion_df, summarization_df, single_hop, answers_df]
|
237 |
+
)
|
238 |
|
239 |
log_timer = gr.Timer(1.0, active=True)
|
240 |
log_timer.tick(
|