Spaces:
Running
Running
import os | |
from dotenv import load_dotenv | |
# Load environment variables from .env file | |
load_dotenv() | |
# Retrieve environment variables | |
DATABASE_URL = os.getenv("postgresql://@localhost:5433/candidate") | |
HUGGINGFACE_API_URL = os.getenv("HUGGINGFACE_API_URL") | |
HUGGINGFACE_API_KEY = os.getenv("HUGGINGFACE_API_KEY") | |
if not DATABASE_URL or not HUGGINGFACE_API_URL or not HUGGINGFACE_API_KEY: | |
raise ValueError("One or more environment variables are missing. Please check your .env file.") |