mrcuddle commited on
Commit
b327c9e
·
verified ·
1 Parent(s): e5c2a3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -4,6 +4,7 @@ from huggingface_hub import HfApi
4
  import spaces
5
 
6
  @spaces.GPU
 
7
  def merge_and_upload(weight_drop_prob, scaling_factor, repo_name, token, base_model, model_to_merge):
8
  # Define a fixed output path
9
  output_path = "/home/user/project/output"
@@ -17,8 +18,7 @@ def merge_and_upload(weight_drop_prob, scaling_factor, repo_name, token, base_mo
17
  "python3", "hf_merge.py",
18
  "-p", str(weight_drop_prob),
19
  "-lambda", str(scaling_factor),
20
- "-repo_file", "repo.txt",
21
- "-output_path", output_path
22
  ]
23
 
24
  # Run the command and capture the output
@@ -36,8 +36,8 @@ def merge_and_upload(weight_drop_prob, scaling_factor, repo_name, token, base_mo
36
 
37
  # Upload the file
38
  api.upload_file(
39
- path_or_fileobj=output_path + "/merged_model.safetensor",
40
- path_in_repo="merged_model.safetensor",
41
  repo_id=repo_name,
42
  token=token
43
  )
 
4
  import spaces
5
 
6
  @spaces.GPU
7
+
8
  def merge_and_upload(weight_drop_prob, scaling_factor, repo_name, token, base_model, model_to_merge):
9
  # Define a fixed output path
10
  output_path = "/home/user/project/output"
 
18
  "python3", "hf_merge.py",
19
  "-p", str(weight_drop_prob),
20
  "-lambda", str(scaling_factor),
21
+ "repo.txt", output_path
 
22
  ]
23
 
24
  # Run the command and capture the output
 
36
 
37
  # Upload the file
38
  api.upload_file(
39
+ path_or_fileobj=output_path,
40
+ path_in_repo="merged_model.safetensors",
41
  repo_id=repo_name,
42
  token=token
43
  )