Created
February 24, 2022 16:39
-
-
Save kingabzpro/e0fad7607dc7609d8adae63978236062 to your computer and use it in GitHub Desktop.
Deploying Gradio App on Spaces Using DagsHub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
PROD_MODEL_PATH = "src/models" | |
TRAIN_PATH = "src/data/processed/train/bathroom" | |
TEST_PATH = "src/data/processed/test/bathroom" | |
if os.path.isdir(".dvc"): | |
print("Running DVC") | |
os.system("dvc config cache.type copy") | |
os.system("dvc config core.no_scm true") | |
if os.system(f"dvc pull {PROD_MODEL_PATH} {TRAIN_PATH } {TEST_PATH }") != 0: | |
exit("dvc pull failed") | |
os.system("rm -r .dvc") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment