Textwizai / load_model.py
Erfan11's picture
Update load_model.py
397fd15 verified
raw
history blame
343 Bytes
import os
import requests
from dotenv import load_dotenv
load_dotenv()
api_key = os.getenv('HF_API_KEY')
model_path = os.getenv('MODEL_PATH')
def load_model():
# For Hugging Face, loading a model is typically done via an API request rather than locally.
headers = {"Authorization": f"Bearer {api_key}"}
return headers, model_path