kinyugo commited on
Commit
0799705
1 Parent(s): 6b9b2c6

Add application

Browse files
Files changed (2) hide show
  1. app.py +20 -0
  2. requirements.txt +2 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gdown
2
+ import torch
3
+ from msanii.config import DemoConfig
4
+ from msanii.demo import run_demo
5
+
6
+ # Download checkpoints
7
+ id = "1G9kF0r5vxYXPSdSuv4t3GR-sBO8xGFCe"
8
+ output = "msanii.pt"
9
+ gdown.download(id=id, output=output, quiet=True)
10
+
11
+ # Setup app config
12
+ config = DemoConfig(
13
+ ckpt_path="msanii.pt",
14
+ device=("cuda" if torch.cuda.is_available() else "cpu"),
15
+ dtype="float32",
16
+ launch=False,
17
+ )
18
+
19
+ demo = run_demo(config)
20
+ demo.queue().launch()
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ gdown==4.6.0
2
+ -e git+https://github.com/Kinyugo/msanii.git#egg=msanii