Spaces:
Runtime error
Runtime error
Xu Ma
commited on
Commit
•
4996f01
1
Parent(s):
c130377
update
Browse files
app.py
CHANGED
@@ -3,8 +3,6 @@ os.system('python setup.py install --user')
|
|
3 |
import argparse
|
4 |
import csv
|
5 |
import sys
|
6 |
-
sys.path.insert(0, "/home/user/.local/lib/python3.8/site-packages")
|
7 |
-
sys.path.append("/home/user/.local/lib/")
|
8 |
sys.path.append("/home/user/.local/lib/python3.8/site-packages/diffvg-0.0.1-py3.8-linux-x86_64.egg")
|
9 |
print(sys.path)
|
10 |
from pathlib import Path
|
@@ -39,10 +37,10 @@ def run_cmd(command):
|
|
39 |
# run_cmd("ls")
|
40 |
# run_cmd("git submodule update --init --recursive")
|
41 |
# run_cmd("python setup.py install --user")
|
42 |
-
run_cmd("pip3 list")
|
43 |
-
import pydiffvg
|
44 |
-
|
45 |
-
print("Sccuessfuly import diffvg ")
|
46 |
# run_cmd("pwd")
|
47 |
# run_cmd("ls")
|
48 |
# run_cmd("git submodule update --init --recursive")
|
@@ -96,9 +94,9 @@ def parse_args():
|
|
96 |
|
97 |
|
98 |
|
99 |
-
|
100 |
-
def run_live(img, experiment_id):
|
101 |
-
main_func(img, experiment_id)
|
102 |
return 0, 1
|
103 |
|
104 |
|
|
|
3 |
import argparse
|
4 |
import csv
|
5 |
import sys
|
|
|
|
|
6 |
sys.path.append("/home/user/.local/lib/python3.8/site-packages/diffvg-0.0.1-py3.8-linux-x86_64.egg")
|
7 |
print(sys.path)
|
8 |
from pathlib import Path
|
|
|
37 |
# run_cmd("ls")
|
38 |
# run_cmd("git submodule update --init --recursive")
|
39 |
# run_cmd("python setup.py install --user")
|
40 |
+
# run_cmd("pip3 list")
|
41 |
+
# import pydiffvg
|
42 |
+
#
|
43 |
+
# print("Sccuessfuly import diffvg ")
|
44 |
# run_cmd("pwd")
|
45 |
# run_cmd("ls")
|
46 |
# run_cmd("git submodule update --init --recursive")
|
|
|
94 |
|
95 |
|
96 |
|
97 |
+
cfg_arg = parse_args()
|
98 |
+
def run_live(img, experiment_id, cfg_arg=cfg_arg):
|
99 |
+
main_func(img, experiment_id, cfg_arg=cfg_arg)
|
100 |
return 0, 1
|
101 |
|
102 |
|
main.py
CHANGED
@@ -344,8 +344,7 @@ class linear_decay_lrlambda_f(object):
|
|
344 |
lr = lr_s * (1-r) + lr_e * r
|
345 |
return lr
|
346 |
|
347 |
-
def main_func(target, experiment):
|
348 |
-
cfg_arg = parse_args()
|
349 |
with open(cfg_arg.config, 'r') as f:
|
350 |
cfg = yaml.load(f, Loader=yaml.FullLoader)
|
351 |
cfg_default = edict(cfg['default'])
|
|
|
344 |
lr = lr_s * (1-r) + lr_e * r
|
345 |
return lr
|
346 |
|
347 |
+
def main_func(target, experiment, cfg_arg):
|
|
|
348 |
with open(cfg_arg.config, 'r') as f:
|
349 |
cfg = yaml.load(f, Loader=yaml.FullLoader)
|
350 |
cfg_default = edict(cfg['default'])
|