osanseviero commited on
Commit
d491d15
1 Parent(s): c232474

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -4,14 +4,6 @@ import subprocess
4
  import os, shutil
5
 
6
  def fork(source_repo, dst_repo, token, repo_type):
7
- subprocess.run(
8
- "git lfs install --force --local".split(),
9
- stderr=subprocess.PIPE,
10
- stdout=subprocess.PIPE,
11
- encoding="utf-8",
12
- check=True
13
- )
14
-
15
  # Creating repos has inconsistent API (https://github.com/huggingface/huggingface_hub/issues/47)
16
  repo_namespace, dst_id = dst_repo.split("/")
17
  username = whoami(token)
@@ -56,9 +48,18 @@ def fork(source_repo, dst_repo, token, repo_type):
56
  cwd=local_dir,
57
  )
58
 
 
 
 
 
 
 
 
 
 
59
  # Push!
60
  subprocess.run(
61
- "git push --force origin main".split(),
62
  stderr=subprocess.PIPE,
63
  stdout=subprocess.PIPE,
64
  encoding="utf-8",
 
4
  import os, shutil
5
 
6
  def fork(source_repo, dst_repo, token, repo_type):
 
 
 
 
 
 
 
 
7
  # Creating repos has inconsistent API (https://github.com/huggingface/huggingface_hub/issues/47)
8
  repo_namespace, dst_id = dst_repo.split("/")
9
  username = whoami(token)
 
48
  cwd=local_dir,
49
  )
50
 
51
+ subprocess.run(
52
+ "git lfs install --force --local".split(),
53
+ stderr=subprocess.PIPE,
54
+ stdout=subprocess.PIPE,
55
+ encoding="utf-8",
56
+ check=True,
57
+ cwd=local_dir,
58
+ )
59
+
60
  # Push!
61
  subprocess.run(
62
+ "git lfs push --force origin main".split(),
63
  stderr=subprocess.PIPE,
64
  stdout=subprocess.PIPE,
65
  encoding="utf-8",