Spaces:
Build error
Build error
import os | |
import numpy as np | |
import pytest | |
from dotenv import load_dotenv | |
from fecnet import FECNetModel | |
load_dotenv() | |
def model(): | |
return FECNetModel(hf_token=os.getenv("HF_TOKEN")) | |
def test_embed(model: FECNetModel): | |
image = open("testdata/face_pic.jpeg", "rb").read() | |
image_arr = np.asarray(bytearray(image), dtype=np.uint8) | |
rep = model.embed_image(image_arr) | |
assert rep.shape == (1, 16) | |