ClementRomac HF staff commited on
Commit
3bfc467
1 Parent(s): eac081a

Removed option groups in morphologies list

Browse files
js/ui_state/components/morphologies_list.js CHANGED
@@ -77,16 +77,7 @@ export default class MorphologiesList extends Component {
77
  .flatMap(morphology => morphology.seeds)
78
  .map((seedEntry, idx) => {
79
  let name = seedEntry.name;
80
-
81
- // Adds options and optgroups
82
- if(seed_names.hasOwnProperty(name)){
83
- seed_names[name] += `<option value="${seedEntry.path}">${name}</option>`;
84
-
85
- }
86
- else {
87
- seed_names[name] = `<optgroup label=${name}>
88
- <option value="${seedEntry.path}">${name}</option>`;
89
- }
90
  });
91
  let options = [];
92
  for(let name in seed_names){
 
77
  .flatMap(morphology => morphology.seeds)
78
  .map((seedEntry, idx) => {
79
  let name = seedEntry.name;
80
+ seed_names[name] += `<option value="${seedEntry.path}">${name}</option>`;
 
 
 
 
 
 
 
 
 
81
  });
82
  let options = [];
83
  for(let name in seed_names){
ui.js CHANGED
@@ -298,14 +298,14 @@ fetch('https://huggingface.co/api/models?filter=teach-my-agent-parkour')
298
  fetch('https://huggingface.co/'+model.id+'/raw/main/ta-config.json')
299
  .then(result => result.text().then(body => {
300
  let policy = JSON.parse(body);
301
- if(!(policy["body"] in morphologies)){
302
- morphologies[policy["body"]] = {
303
- "morphology": policy["body"],
304
  "seeds": []
305
  }
306
  }
307
 
308
- morphologies[policy["body"]]["seeds"].push({
309
  "seed": policy["seed"],
310
  "name": policy["name"],
311
  "path": 'https://huggingface.co/'+model.id+'/resolve/main'
 
298
  fetch('https://huggingface.co/'+model.id+'/raw/main/ta-config.json')
299
  .then(result => result.text().then(body => {
300
  let policy = JSON.parse(body);
301
+ if(!(policy["morphology"] in morphologies)){
302
+ morphologies[policy["morphology"]] = {
303
+ "morphology": policy["morphology"],
304
  "seeds": []
305
  }
306
  }
307
 
308
+ morphologies[policy["morphology"]]["seeds"].push({
309
  "seed": policy["seed"],
310
  "name": policy["name"],
311
  "path": 'https://huggingface.co/'+model.id+'/resolve/main'