chainyo commited on
Commit
c769ff4
1 Parent(s): a18af9d

fix training_loop for flavors

Browse files
Files changed (1) hide show
  1. training_loop.py +2 -2
training_loop.py CHANGED
@@ -77,11 +77,11 @@ def main(
77
  config.num_labels = num_labels
78
  config.id2label = id2label
79
  config.label2id = {v: k for k, v in id2label_file.items()}
80
- config.push_to_hub(".", repo_url=f"https://huggingface.co/ChainYo/segformer-{model_flavor}-sidewalk")
81
 
82
  checkpoint_path = checkpoint_callback.best_model_filepath
83
  model = SegformerForSemanticSegmentation.from_pretrained(checkpoint_path, config=config,)
84
- model.push_to_hub(".", repo_url=f"https://huggingface.co/ChainYo/segformer-{model_flavor}-sidewalk")
85
 
86
 
87
  if __name__ == "__main__":
 
77
  config.num_labels = num_labels
78
  config.id2label = id2label
79
  config.label2id = {v: k for k, v in id2label_file.items()}
80
+ config.push_to_hub(f"flavors/b{model_flavor}", repo_url=f"https://huggingface.co/ChainYo/segformer-{model_flavor}-sidewalk")
81
 
82
  checkpoint_path = checkpoint_callback.best_model_filepath
83
  model = SegformerForSemanticSegmentation.from_pretrained(checkpoint_path, config=config,)
84
+ model.push_to_hub(f"flavors/b{model_flavor}", repo_url=f"https://huggingface.co/ChainYo/segformer-{model_flavor}-sidewalk")
85
 
86
 
87
  if __name__ == "__main__":