sasha HF staff commited on
Commit
0e8e07c
1 Parent(s): cb4cca6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -16
app.py CHANGED
@@ -13,7 +13,7 @@ st.title("Metric Compare")
13
  st.markdown("### Choose the dataset you want to use for the comparison:")
14
 
15
  api = HfApi()
16
- dsets = [d.id for d in api.list_datasets(filter="task_categories:text-classification", sort = "downloads", direction=-1, limit = 20)]
17
 
18
  dset = st.selectbox('Choose a dataset from the Hub', options=dsets)
19
 
@@ -37,29 +37,15 @@ models = st.multiselect(
37
  'Choose the models that have been trained/finetuned on this dataset',
38
  options=all_models)
39
 
40
- button = st.button("Print Models",disabled=False)
41
 
42
- if button :
43
- if len(location) < 6:
44
- st.write(models)
45
- else:
46
- st.warning("Please select at most 5 models")
47
-
48
  st.markdown("### What two metrics do you want to compare?")
49
 
50
  metrics = st.multiselect(
51
  'Choose the metrics for the comparison',
52
  options=['f1', 'accuracy', 'precision', 'recall'])
53
 
54
- button2 = st.button("Print Metrics",disabled=False)
55
-
56
- if button2 :
57
- if len(metrics ) < 3:
58
- st.write(metrics)
59
- else:
60
- st.warning("Please select at most 2 metrics")
61
 
62
- st.markdown("### Now wait for the dataset and models to load (this can take some time if they are big!")
63
 
64
  ### Loading data
65
  try:
 
13
  st.markdown("### Choose the dataset you want to use for the comparison:")
14
 
15
  api = HfApi()
16
+ dsets = [d.id for d in api.list_datasets(filter="task_categories:text-classification", sort = "downloads", direction=-1, limit = 20) if d.id not 'glue']
17
 
18
  dset = st.selectbox('Choose a dataset from the Hub', options=dsets)
19
 
 
37
  'Choose the models that have been trained/finetuned on this dataset',
38
  options=all_models)
39
 
 
40
 
 
 
 
 
 
 
41
  st.markdown("### What two metrics do you want to compare?")
42
 
43
  metrics = st.multiselect(
44
  'Choose the metrics for the comparison',
45
  options=['f1', 'accuracy', 'precision', 'recall'])
46
 
 
 
 
 
 
 
 
47
 
48
+ st.markdown("### Please wait for the dataset and models to load (this can take some time if they are big!")
49
 
50
  ### Loading data
51
  try: