YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
SWU Card Scanner - Hugging Face Inference Endpoint
AI-powered card recognition for Star Wars Unlimited TCG.
Model
Uses openai/clip-vit-large-patch14 for image embeddings with a pre-computed database of 262 card embeddings.
Usage
Via Python
import requests
import base64
# Read image
with open("card.jpg", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode()
# Call endpoint
response = requests.post(
"https://api-inference.huggingface.co/models/YOUR_USERNAME/swu-card-scanner",
headers={"Authorization": "Bearer YOUR_HF_TOKEN"},
json={
"inputs": image_b64,
"parameters": {"top_k": 5}
}
)
print(response.json())
Via cURL
curl -X POST \
https://api-inference.huggingface.co/models/YOUR_USERNAME/swu-card-scanner \
-H "Authorization: Bearer YOUR_HF_TOKEN" \
-H "Content-Type: application/json" \
-d '{"inputs": "BASE64_IMAGE_DATA"}'
Response Format
{
"success": true,
"quality": "excellent",
"message": "Match confidence: 98.5%",
"best_match": {
"card_id": "card_11",
"confidence": 0.985,
"name": "Allegiant General Pryde",
"image_url": "https://cdn.swu-db.com/images/cards/JTL/133.png",
"data": { ... }
},
"alternatives": [ ... ]
}
Files
handler.py- Custom inference handlerembeddings_clip-large.pkl- Pre-computed card embeddingscard_data.json- Card metadata
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support