hysts HF Staff commited on
Commit
808ce2d
·
1 Parent(s): a1b524b

Change the way to apply patch

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -10,8 +10,10 @@ import subprocess
10
  import gradio as gr
11
 
12
  if os.getenv('SYSTEM') == 'spaces':
13
- subprocess.call('git apply ../patch.e4e'.split(), cwd='encoder4editing')
14
- subprocess.call('git apply ../patch.hairclip'.split(), cwd='HairCLIP')
 
 
15
 
16
  from model import Model
17
 
 
10
  import gradio as gr
11
 
12
  if os.getenv('SYSTEM') == 'spaces':
13
+ with open('patch.e4e') as f:
14
+ subprocess.call('patch -p1'.split(), cwd='encoder4editing', stdin=f)
15
+ with open('patch.hairclip') as f:
16
+ subprocess.call('patch -p1'.split(), cwd='HairCLIP', stdin=f)
17
 
18
  from model import Model
19