talalif commited on
Commit
33948f0
·
verified ·
1 Parent(s): dfab677

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -2
app.py CHANGED
@@ -20,9 +20,27 @@ command = "\"import sys; sys.path.append('./MuseV/MuseV'); sys.path.append('./Mu
20
  subprocess.run(["python","-c",command])
21
  subprocess.run(["mv", "./MuseV/scripts/inference/text2video.py", "./MuseV/text2video.py"])
22
  subprocess.run(["mv", "./MuseV/scripts/inference/video2video.py", "./MuseV/video2video.py"])
23
- with open ("./MuseV/text2video.py","r+") as scrip:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  s = scrip.read()
25
- s = s.replace('PROJECT_DIR = os.path.join(os.path.dirname(__file__), "")', "PROJECT_DIR = /home/user/app")
 
 
 
26
 
27
  @spaces.GPU
28
  def run():
 
20
  subprocess.run(["python","-c",command])
21
  subprocess.run(["mv", "./MuseV/scripts/inference/text2video.py", "./MuseV/text2video.py"])
22
  subprocess.run(["mv", "./MuseV/scripts/inference/video2video.py", "./MuseV/video2video.py"])
23
+
24
+ with open ("./MuseV/configs/model/motion_model.py","r+") as scrip:
25
+ s = scrip.read()
26
+ s = s.replace('/content/MuseV/checkpoints', "/home/user/app/MuseV/checkpoints")
27
+ scrip.write(s)
28
+ scrip.truncate()
29
+ scrip.seek(0)
30
+
31
+ with open ("./MuseV/configs/model/ip_adapter.py","r+") as scrip:
32
+ s = scrip.read()
33
+ s = s.replace('/content/MuseV/checkpoints', "/home/user/app/MuseV/checkpoints")
34
+ scrip.write(s)
35
+ scrip.truncate()
36
+ scrip.seek(0)
37
+
38
+ with open ("./MuseV/configs/model/T2I_all_model.py","r+") as scrip:
39
  s = scrip.read()
40
+ s = s.replace('/content/MuseV/checkpoints', "/home/user/app/MuseV/checkpoints")
41
+ scrip.write(s)
42
+ scrip.truncate()
43
+ scrip.seek(0)
44
 
45
  @spaces.GPU
46
  def run():