Tremeschin commited on
Commit
f559c43
·
unverified ·
1 Parent(s): e10d346

Better hook for installing latest git dependencies

Browse files
Files changed (1) hide show
  1. app.py +17 -2
app.py CHANGED
@@ -1,7 +1,22 @@
1
- import spaces
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  from DepthFlow.Webui import DepthGradio
3
 
4
- spaces.GPU(DepthGradio().launch)(
5
  turbopipe=True,
6
  workers=4,
7
  nvenc=True,
 
1
+ import subprocess
2
+ import sys
3
+
4
+
5
+ # Install latest code
6
+ def upgrade(dependency):
7
+ subprocess.run((
8
+ sys.executable, "-m", "pip", "install",
9
+ dependency, "--upgrade",
10
+ ))
11
+
12
+ upgrade("git+https://github.com/BrokenSource/BrokenSource@main")
13
+ upgrade("git+https://github.com/BrokenSource/ShaderFlow@main")
14
+ upgrade("git+https://github.com/BrokenSource/DepthFlow@main")
15
+
16
+
17
  from DepthFlow.Webui import DepthGradio
18
 
19
+ DepthGradio().launch(
20
  turbopipe=True,
21
  workers=4,
22
  nvenc=True,