lemms commited on
Commit
be3e0ec
·
verified ·
1 Parent(s): 22ac115

fix: Resolve Gradio 4.44.1 compatibility issue - Remove unsupported 'info' parameter from gr.JSON()

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -690,6 +690,20 @@ class OpenLLMTrainer:
690
  print(f" - Type: model")
691
  print(f" - Source: {config.output_dir}")
692
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
693
  # Upload model files to Hugging Face Hub
694
  # This creates a new model repository with all the files
695
  self.hf_api.upload_folder(
 
690
  print(f" - Type: model")
691
  print(f" - Source: {config.output_dir}")
692
 
693
+ # Create the repository first if it doesn't exist
694
+ try:
695
+ from huggingface_hub import create_repo
696
+ create_repo(
697
+ repo_id=repo_id,
698
+ repo_type="model",
699
+ exist_ok=True,
700
+ private=False
701
+ )
702
+ print(f"✅ Repository {repo_id} ready for upload")
703
+ except Exception as create_error:
704
+ print(f"⚠️ Repository creation warning: {create_error}")
705
+ print(" Continuing with upload attempt...")
706
+
707
  # Upload model files to Hugging Face Hub
708
  # This creates a new model repository with all the files
709
  self.hf_api.upload_folder(