Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,9 +33,9 @@ def embed_figures(html_body, resources):
|
|
| 33 |
|
| 34 |
def update_max_index(score_option, output_option):
|
| 35 |
if output_option == "All":
|
| 36 |
-
max_index = len(ds[score_option])
|
| 37 |
else:
|
| 38 |
-
max_index = len(ds_out[score_option])
|
| 39 |
return gr.Slider(maximum=max_index), gr.Number(value=0, maximum=max_index)
|
| 40 |
|
| 41 |
|
|
@@ -68,7 +68,7 @@ with gr.Blocks() as demo:
|
|
| 68 |
with gr.Row():
|
| 69 |
score_options = gr.Dropdown(["error","0", "1", "2", "3", "4", "5"], value="5", label="Notebook score", info="Select the assigned notebook score.")
|
| 70 |
output_options = gr.Radio(["Outputs only", "All"], value="Outputs only", label="Output filter", info="Many notebooks contain no outputs.")
|
| 71 |
-
index_slider = gr.Slider(minimum=0, maximum=len(ds_out["5"]), step=1, value=0, label="Index")
|
| 72 |
|
| 73 |
file = gr.File()
|
| 74 |
response = gr.Markdown("", label="LLM score justification")
|
|
|
|
| 33 |
|
| 34 |
def update_max_index(score_option, output_option):
|
| 35 |
if output_option == "All":
|
| 36 |
+
max_index = len(ds[score_option])-1
|
| 37 |
else:
|
| 38 |
+
max_index = len(ds_out[score_option])-1
|
| 39 |
return gr.Slider(maximum=max_index), gr.Number(value=0, maximum=max_index)
|
| 40 |
|
| 41 |
|
|
|
|
| 68 |
with gr.Row():
|
| 69 |
score_options = gr.Dropdown(["error","0", "1", "2", "3", "4", "5"], value="5", label="Notebook score", info="Select the assigned notebook score.")
|
| 70 |
output_options = gr.Radio(["Outputs only", "All"], value="Outputs only", label="Output filter", info="Many notebooks contain no outputs.")
|
| 71 |
+
index_slider = gr.Slider(minimum=0, maximum=len(ds_out["5"])-1, step=1, value=0, label="Index")
|
| 72 |
|
| 73 |
file = gr.File()
|
| 74 |
response = gr.Markdown("", label="LLM score justification")
|