lvwerra HF Staff commited on
Commit
175ee5c
·
verified ·
1 Parent(s): e476ef0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -42,9 +42,9 @@ def update_max_index(score_option, output_option):
42
  def parse_notebook(score_options, output_options, index):
43
  reset_tmp_folder()
44
  if output_options == "All":
45
- sample = ds[score_options][i]
46
  else:
47
- sample = ds_out[score_options][i]
48
 
49
  notebook_string = sample["text"]
50
  notebook_id = sample["id"].split("/")[-1]
@@ -66,7 +66,7 @@ with gr.Blocks() as demo:
66
  gr.Markdown("# Kaggle Notebooks")
67
  score_options = gr.Dropdown(["error","0", "1", "2", "3", "4", "5"], value="5", label="Notebook score", info="Select the assigned notebook score.")
68
  output_options = gr.Radio(["Outputs only", "All"], value="Outputs only", label="Output filter", info="Many notebooks contain no outputs.")
69
- index_slider = gr.Slider(minimum=0, maximum=100, step=1, value=0, label="Index")
70
 
71
  file = gr.File()
72
  html = gr.HTML("")
 
42
  def parse_notebook(score_options, output_options, index):
43
  reset_tmp_folder()
44
  if output_options == "All":
45
+ sample = ds[score_options][index]
46
  else:
47
+ sample = ds_out[score_options][index]
48
 
49
  notebook_string = sample["text"]
50
  notebook_id = sample["id"].split("/")[-1]
 
66
  gr.Markdown("# Kaggle Notebooks")
67
  score_options = gr.Dropdown(["error","0", "1", "2", "3", "4", "5"], value="5", label="Notebook score", info="Select the assigned notebook score.")
68
  output_options = gr.Radio(["Outputs only", "All"], value="Outputs only", label="Output filter", info="Many notebooks contain no outputs.")
69
+ index_slider = gr.Slider(minimum=0, maximum=len(ds_out["5"]), step=1, value=0, label="Index")
70
 
71
  file = gr.File()
72
  html = gr.HTML("")