Nicous commited on
Commit
4091b06
·
verified ·
1 Parent(s): 22ae0f6

Update app.py

Browse files

fix bugs (upload large-v3.pt)

Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -55,7 +55,13 @@ ego_gpt_path = hf_hub_download(
55
  )
56
 
57
  import shutil
58
- shutil.move('./speech_encoder/large-v3.pt', '/large-v3.pt')
 
 
 
 
 
 
59
 
60
 
61
 
 
55
  )
56
 
57
  import shutil
58
+
59
+ try:
60
+ os.chmod("./", 0o777)
61
+ shutil.move('./speech_encoder/large-v3.pt', '/large-v3.pt')
62
+ except PermissionError as e:
63
+ subprocess.run(['mv', './speech_encoder/large-v3.pt', './large-v3.pt'])
64
+
65
 
66
 
67