File size: 717 Bytes
ab3a223
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python3
"""Test the deployment version of the ensemble."""

from nutrition_ensemble import NutritionEnsemble

print("Testing Deployment Version")
print("=" * 60)

# Initialize ensemble
print("\n1. Loading ensemble...")
ensemble = NutritionEnsemble(".")
print(f"   ✓ Loaded {len(ensemble.embeddings)} models")

# Check embeddings
print("\n2. Checking embeddings...")
for name, emb in ensemble.embeddings.items():
    print(f"   ✓ {name}: {emb.shape}")

# Test recommendations
print("\n3. Testing recommendations...")
recs = ensemble.recommend(user_id=0, top_k=5)
print(f"   ✓ Generated {len(recs)} recommendations")
print("\n", recs)

print("\n" + "=" * 60)
print("✓ Deployment version works!")