CultureHub: Project Story
Inspiration
Our inspiration for CultureHub came from a passion for connecting people with culturally resonant experiences in an accessible, privacy-first way. In a world overwhelmed with generic recommendations, we saw an opportunity to leverage Qloo’s Taste AI™ to deliver hyper-personalized insights—whether planning a culturally rich trip, discovering niche books, or identifying a product’s ideal audience—without compromising user privacy. The Qloo LLM Hackathon challenged us to harness Qloo’s rich cultural dataset (spanning music, dining, television, sports, products, and books) and pair it with cutting-edge AI. We envisioned a single, intuitive platform where users could explore their cultural interests seamlessly, from jazz-filled New Orleans itineraries to trending music genres in Miami. Our goal was to make cultural discovery feel effortless, ethical, and exciting.
What it does
CultureHub is a Streamlit web application that delivers personalized, privacy-first cultural insights across six use cases, powered by Qloo’s Taste AI™ and Google Gemini (gemini-2.5-pro). Users select a use case (e.g., Plan a Trip, Discover Content) and input preferences (e.g., “I love jazz and Italian food, plan a trip to New Orleans”) to receive tailored outputs, such as:
- Travel Itineraries: 5-day plans with activities, costs, and transportation (e.g., visiting the Louvre in Paris).
- Lifestyle Recommendations: Curated dining (restaurants, cafes, bakeries) and fashion suggestions (e.g., trendy Tokyo eateries).
- Content Discovery: Books, music, and media recommendations (e.g., sci-fi novels like Dune or artists like Vangelis).
- Audience Prediction: Demographic and interest profiles for products (e.g., eco-friendly sneakers).
- Product Personalization: Customized product features (e.g., smartwatch settings for fitness enthusiasts).
- Cultural Trends: Insights into trending genres or styles (e.g., Latin Pop in Miami).
CultureHub leverages Qloo’s cultural database—covering music (artists, albums, songs), dining (restaurants, cafes, bakeries), television (TV series, presenters, networks), sports (athletes, teams, stadiums), products (brands, companies), and books (authors, books, publishers)—to deliver high-affinity recommendations (affinity scores: >80 very high, 60-80 high, <50 low) with no personal data required.
How we built it
We built CultureHub using a modern tech stack optimized for rapid development and scalability:
- Frontend: Streamlit for a clean, interactive UI with collapsible itineraries and clear affinity score displays.
- Backend: Python, integrating Google Gemini (gemini-2.5-pro) for natural language processing and Qloo’s Insights API for cultural recommendations.
- APIs:
- Gemini: Parses user inputs to extract preferences (e.g., “jazz”, “Italian”) and constructs Qloo query parameters (e.g.,
filter.type=urn:entity:place,signal.interests.tags=jazz,Italian). - Qloo: Queries cultural data using entity types like
urn:entity:artist(music),urn:entity:place(dining), andurn:entity:book(books).
- Gemini: Parses user inputs to extract preferences (e.g., “jazz”, “Italian”) and constructs Qloo query parameters (e.g.,
- Workflow:
- Users select a use case and input preferences via Streamlit.
- Gemini processes the input, identifies preferences, and maps them to Qloo parameters.
- Qloo API is queried for recommendations (e.g., restaurants in Tokyo with high affinity for “trendy”).
- Gemini formats the response (e.g., 5-day itinerary, bulleted list) based on the use case.
- Results are displayed with affinity scores and a privacy-first disclaimer.
- Error Handling: Robust logic for Qloo 403 errors (retries with simplified parameters) and Gemini JSON parsing errors (regex-based extraction with fallbacks).
- Deployment: Hosted on Streamlit Cloud with environment variables for API keys (
GEMINI_API_KEY,QLOO_API_KEY).
We structured the app to map Qloo’s categories to its supported entity types (e.g., urn:entity:artist for music artists, albums, and songs; urn:entity:place for dining and sports stadiums), ensuring compatibility with Qloo’s API constraints.
Challenges we ran into
Building CultureHub was a race against time, with ~12 hours to deliver a polished solution. Key challenges included:
- Qloo API 403 Forbidden Errors: The provided API key frequently returned 403 errors, likely due to access restrictions or endpoint misconfigurations. We implemented retry logic with simplified parameters (e.g.,
filter.type=urn:entity:place, single tag) and fallback responses to ensure usability. - Gemini JSON Parsing Issues: Gemini’s responses occasionally produced malformed JSON, triggering
ValueError. We used regex (re.search) to extract valid JSON blocks and added default parameters (e.g.,culture,historyfor New York City) as a fallback. - Qloo Category Limitations: Qloo’s API supports specific entity types (e.g.,
urn:entity:artistfor music), but not direct mappings for albums, songs, or networks. We creatively mapped these (e.g., albums/songs toartist, networks totv_show) to align with user expectations. - Time Pressure: With the hackathon deadline looming (August 1, 2025, 11:45 AM EDT), we prioritized core functionality and robust error handling over advanced features like dynamic intent detection.
Accomplishments that we're proud of
- Seamless Qloo Integration: Successfully queried Qloo’s Insights API across six use cases, delivering culturally relevant recommendations for music, dining, television, sports, products, and books.
- Polished User Experience: Crafted a Streamlit UI with collapsible itineraries for travel plans and clear affinity score visualizations, making insights accessible and engaging.
- Robust Error Handling: Overcame 403 errors and JSON parsing issues with retries, fallbacks, and debug logging, ensuring a functional app even under API constraints.
- Privacy-First Design: Emphasized Qloo’s ethical approach, delivering high-affinity recommendations (>80 affinity for top matches) without collecting personal data.
- Rapid Development: Built and tested a feature-rich app in ~12 hours, showcasing our ability to deliver under pressure.
What we learned
- Qloo’s Taste AI: Gained deep insights into Qloo’s privacy-first cultural recommendation engine, mastering its entity types (
urn:entity:artist,urn:entity:place) and affinity scores. - Gemini Integration: Learned to optimize Gemini prompts for precise preference extraction and JSON output, handling variability with regex and fallbacks.
- API Challenges: Understood the importance of robust error handling for external APIs, especially under hackathon constraints (e.g., 403 errors).
- Streamlit UX: Mastered Streamlit’s capabilities for creating interactive, user-friendly interfaces with minimal code.
- Cultural Mapping: Discovered how to map broad categories (e.g., albums, networks) to Qloo’s supported entities, enhancing recommendation flexibility.
What's next for CultureHub - Qloo
CultureHub is just the beginning. Future enhancements include:
- Dynamic Intent Detection: Remove the sidebar use case selection, allowing fully natural language inputs (e.g., “Plan a trip to Paris” or “Suggest sci-fi books”) with Gemini-driven intent classification.
- Expanded Qloo Support: Integrate additional Qloo endpoints (if available) to directly support albums, songs, and networks, enhancing music and television recommendations.
- Real-Time Trends: Incorporate live cultural trend analysis using Qloo’s
urn:entity:tagfor dynamic insights (e.g., emerging fashion styles). - Scalability: Extend CultureHub for commercial platforms (e.g., travel apps, e-commerce) by integrating user feedback loops and multi-language support.
- Performance Optimization: Add token counting for Gemini API calls to prevent request size issues and enhance response speed.
CultureHub showcases the power of Qloo’s Taste AI and Gemini to make cultural discovery intuitive, ethical, and impactful. We’re excited to see how it can shape personalized experiences in travel, media, and beyond!
Built for the Qloo LLM Hackathon. Powered by Qloo's Taste AI™ and Google Gemini.
Built With
- google-gemini
- python
- qloo-api
- streamlit
- streamlit-cloud
Log in or sign up for Devpost to join the conversation.