Spaces:
Running
on
Zero
Running
on
Zero
update
Browse files- imcui/ui/app_class.py +5 -2
imcui/ui/app_class.py
CHANGED
@@ -5,6 +5,7 @@ import gradio as gr
|
|
5 |
import numpy as np
|
6 |
from easydict import EasyDict as edict
|
7 |
from omegaconf import OmegaConf
|
|
|
8 |
|
9 |
# from .sfm import SfmEngine
|
10 |
from .utils import (
|
@@ -19,8 +20,10 @@ from .utils import (
|
|
19 |
send_to_match,
|
20 |
)
|
21 |
import os
|
22 |
-
GITHUB_TOKEN = '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'
|
23 |
-
GOOGLE_TOKEN = '1qnxd5DKomsYUH9_8dQ4Xvwatg_vI-vsh'
|
|
|
|
|
24 |
if not (Path(__file__).parent / "../third_party/MatchAnything").exists():
|
25 |
print("**********************************")
|
26 |
os.system(f"cd {str(Path(__file__).parent / '../third_party')} && git clone https://{GITHUB_TOKEN}@github.com/hxy-123/MatchAnything_HF.git && mv MatchAnything_HF MatchAnything && cd MatchAnything && gdown {GOOGLE_TOKEN} && unzip weights.zip")
|
|
|
5 |
import numpy as np
|
6 |
from easydict import EasyDict as edict
|
7 |
from omegaconf import OmegaConf
|
8 |
+
import os
|
9 |
|
10 |
# from .sfm import SfmEngine
|
11 |
from .utils import (
|
|
|
20 |
send_to_match,
|
21 |
)
|
22 |
import os
|
23 |
+
# GITHUB_TOKEN = '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'
|
24 |
+
# GOOGLE_TOKEN = '1qnxd5DKomsYUH9_8dQ4Xvwatg_vI-vsh'
|
25 |
+
GITHUB_TOKEN = os.environ.get('GITHUB_TOKEN')
|
26 |
+
GOOGLE_TOKEN = os.environ.get('GOOGLE_TOKEN')
|
27 |
if not (Path(__file__).parent / "../third_party/MatchAnything").exists():
|
28 |
print("**********************************")
|
29 |
os.system(f"cd {str(Path(__file__).parent / '../third_party')} && git clone https://{GITHUB_TOKEN}@github.com/hxy-123/MatchAnything_HF.git && mv MatchAnything_HF MatchAnything && cd MatchAnything && gdown {GOOGLE_TOKEN} && unzip weights.zip")
|