Spaces:
Runtime error
Runtime error
File size: 354 Bytes
1319515 |
1 2 3 4 5 6 7 8 |
# Load model directly
import os
from dotenv import load_dotenv
load_dotenv()
model_name = os.getenv('MODEL_NAME') # model name for huggingface.co in .env file
from transformers import AutoImageProcessor, AutoModelForObjectDetection
processor = AutoImageProcessor.from_pretrained(model_name)
model = AutoModelForObjectDetection.from_pretrained(model_name) |