Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,8 @@ import os
|
|
| 5 |
# print(f"pip3 uninstall gradio")
|
| 6 |
# results = os.popen(f"pip3 uninstall gradio -y")
|
| 7 |
# print(results.readlines())
|
| 8 |
-
|
| 9 |
-
|
| 10 |
results = os.popen(f"pip3 install -r requirements.txt -i https://pypi.org/simple")
|
| 11 |
print("step1:", results.readlines())
|
| 12 |
results = os.popen(f"pip3 uninstall scepter -y")
|
|
@@ -48,6 +48,7 @@ def link_model():
|
|
| 48 |
hf_path = os.path.join(hf_root_dir, hf_name)
|
| 49 |
cmd = f"mkdir -p {ms_path} && ln -s {hf_path}/* {ms_path}"
|
| 50 |
os.system(cmd)
|
|
|
|
| 51 |
|
| 52 |
link_model()
|
| 53 |
|
|
@@ -70,9 +71,9 @@ config_file = os.path.join(os.path.dirname(scepter.dirname), "scepter/methods/st
|
|
| 70 |
config = Config(load=True, cfg_file=config_file)
|
| 71 |
|
| 72 |
for v in config.FILE_SYSTEM:
|
| 73 |
-
|
| 74 |
# v.TEMP_DIR = os.path.join("/data/.huggingface", v.TEMP_DIR)
|
| 75 |
-
v.TEMP_DIR = os.path.join("~/.cache/huggingface/hub", v.TEMP_DIR)
|
| 76 |
os.makedirs(v.TEMP_DIR, exist_ok=True)
|
| 77 |
|
| 78 |
prepare(config)
|
|
|
|
| 5 |
# print(f"pip3 uninstall gradio")
|
| 6 |
# results = os.popen(f"pip3 uninstall gradio -y")
|
| 7 |
# print(results.readlines())
|
| 8 |
+
results = os.popen(f"ls ~/.cache/huggingface/hub")
|
| 9 |
+
print("step0:", results.readlines())
|
| 10 |
results = os.popen(f"pip3 install -r requirements.txt -i https://pypi.org/simple")
|
| 11 |
print("step1:", results.readlines())
|
| 12 |
results = os.popen(f"pip3 uninstall scepter -y")
|
|
|
|
| 48 |
hf_path = os.path.join(hf_root_dir, hf_name)
|
| 49 |
cmd = f"mkdir -p {ms_path} && ln -s {hf_path}/* {ms_path}"
|
| 50 |
os.system(cmd)
|
| 51 |
+
print(cmd)
|
| 52 |
|
| 53 |
link_model()
|
| 54 |
|
|
|
|
| 71 |
config = Config(load=True, cfg_file=config_file)
|
| 72 |
|
| 73 |
for v in config.FILE_SYSTEM:
|
| 74 |
+
v.TEMP_DIR = os.path.join("./", v.TEMP_DIR)
|
| 75 |
# v.TEMP_DIR = os.path.join("/data/.huggingface", v.TEMP_DIR)
|
| 76 |
+
# v.TEMP_DIR = os.path.join("~/.cache/huggingface/hub", v.TEMP_DIR)
|
| 77 |
os.makedirs(v.TEMP_DIR, exist_ok=True)
|
| 78 |
|
| 79 |
prepare(config)
|