--- title: FomoFeed User Profiler emoji: πŸ‘€ colorFrom: indigo colorTo: green sdk: docker pinned: false --- # FomoFeed User Profiler AI AI-powered user profiling using Turkish BERT embeddings and behavioral analysis. ## 🎯 Purpose Creates comprehensive user profiles based on content consumption, creation, and engagement patterns. ## 🧠 Model - BERT: `dbmdz/bert-base-turkish-cased` (768-dim embeddings) - Analysis: Rule-based behavioral classification - Output: Semantic embeddings + structured profile ## πŸ“₯ Input ```json { "user_id": 12, "post_captions": ["Harika bir gΓΌn", "Yeni proje"], "moment_captions": ["Kahve molasΔ±"], "liked_tags": ["yazilim", "teknoloji", "kahve"], "saved_tags": ["yazilim", "python"], "commented_tags": ["teknoloji"], "engagement_hours": [9, 12, 19, 20, 21], "engagement_types": ["view", "like", "save", "comment"] } ``` ## πŸ“€ Output ```json { "user_id": 12, "interests": ["yazilim", "teknoloji", "python"], "content_preference": { "passive_consumer": 0.25, "active_engager": 0.60, "content_creator": 0.15 }, "activity_pattern": { "peak_hours": [19, 20, 21], "activity_distribution": { "morning": 0.2, "afternoon": 0.3, "evening": 0.4, "night": 0.1 }, "timezone_pattern": "evening" }, "engagement_style": { "style": "active", "interaction_rate": 0.45, "content_saver": true, "commenter": true }, "optimal_hours": [19, 20, 21], "confidence": 0.78 } ``` ## πŸš€ Usage ### Create Profile ```bash curl -X POST "https://YOUR-SPACE-URL/profile" \ -H "Content-Type: application/json" \ -d '{ "user_id": 12, "liked_tags": ["tech", "ai"], "engagement_hours": [19, 20, 21], "engagement_types": ["like", "save"] }' ``` ### Get BERT Embedding ```bash curl -X POST "https://YOUR-SPACE-URL/embedding" \ -H "Content-Type: application/json" \ -d '{ "user_id": 12, "post_captions": ["AI is amazing"], "liked_tags": ["ai", "tech"] }' ``` ## πŸ“Š Profile Dimensions ### Interests Top 10 tags based on weighted engagement (saves > comments > likes) ### Content Preference - **Passive Consumer**: High view ratio - **Active Engager**: High like/save ratio - **Content Creator**: Post/moment creation frequency ### Activity Pattern - **Peak Hours**: Top 3 most active hours - **Distribution**: Morning/afternoon/evening/night breakdown - **Timezone Pattern**: Primary activity window ### Engagement Style - **Lurker**: <10% interaction rate - **Casual**: 10-30% interaction rate - **Active**: 30-60% interaction rate - **Power User**: >60% interaction rate ## 🎯 Use Cases - Content recommendation - Feed personalization - Notification timing - Creator matching - Trend prediction ## πŸ“ˆ Performance - Profile creation: <200ms - BERT embedding: ~500ms - Batch support: Up to 50 users - Confidence: 0.0-1.0 (based on data volume) Built with FastAPI + Transformers + PyTorch