inoki-giskard commited on
Commit
1bf401f
1 Parent(s): 18bd728

Fix update for gradio 4+

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. requirements.txt +0 -1
app.py CHANGED
@@ -65,10 +65,10 @@ def try_submit(model_id, dataset_id, dataset_config, dataset_split, local):
65
  gr.Warning(f'Dataset "{dataset_id}" is not accessible. Please set your HF_TOKEN if it is a private dataset.')
66
  elif isinstance(config, list):
67
  gr.Warning(f'Dataset "{dataset_id}" does not have "{dataset_config}" config. Please choose a valid config.')
68
- config = gr.Dropdown.update(choices=config, value=config[0])
69
  elif isinstance(split, list):
70
  gr.Warning(f'Dataset "{dataset_id}" does not have "{dataset_split}" split. Please choose a valid split.')
71
- split = gr.Dropdown.update(choices=split, value=split[0])
72
  else:
73
  dataset_ok = True
74
 
 
65
  gr.Warning(f'Dataset "{dataset_id}" is not accessible. Please set your HF_TOKEN if it is a private dataset.')
66
  elif isinstance(config, list):
67
  gr.Warning(f'Dataset "{dataset_id}" does not have "{dataset_config}" config. Please choose a valid config.')
68
+ config = gr.update(choices=config, value=config[0])
69
  elif isinstance(split, list):
70
  gr.Warning(f'Dataset "{dataset_id}" does not have "{dataset_split}" split. Please choose a valid split.')
71
+ split = gr.update(choices=split, value=split[0])
72
  else:
73
  dataset_ok = True
74
 
requirements.txt CHANGED
@@ -3,4 +3,3 @@ huggingface_hub
3
  torch==2.0.1
4
  transformers
5
  datasets
6
- gradio==3.44.4
 
3
  torch==2.0.1
4
  transformers
5
  datasets