Spaces:
Runtime error
Runtime error
from zigistry import constants | |
import os | |
from logging import error | |
def CorrectlyCompletedPreRequisites() -> bool: | |
for i in constants.FILES: | |
if not os.path.exists(i): | |
error(f"File {i} does not exist") | |
return False | |
if not os.path.exists(constants.PERSIST_DIR): | |
error(f"Directory {constants.PERSIST_DIR} does not exist") | |
return False | |
if constants.OR_TOKEN == None: | |
error("Hugging Face token not set") | |
return False | |
return True | |
def performPreRequisites(): | |
os.makedirs(constants.PERSIST_DIR, exist_ok=True) | |