A Flask web application that helps users explore and understand different countries' cultures, traditions, architecture, and cultural nuances using Google's Gemini AI.
- Cultural Insights: Deep dive into values, customs, and social norms
- Traditions: Learn about festivals and ceremonial practices
- Architecture: Explore iconic structures and design styles
- Cultural Nuances: Understand dos, don'ts, and local etiquette
- 70+ Countries: Comprehensive coverage of countries worldwide
kulturekode/
│
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
├── README.md # This file
│
├── templates/
│ ├── index.html # Landing page
│ └── app.html # Main application page
│
└── static/
├── css/
│ └── style.css # Application styles
└── js/
└── app.js # Client-side JavaScript
- Python 3.8 or higher
- Google Gemini API key (Get one here)
-
Clone or download the project
-
Navigate to the project directory
cd kulture-kode -
Create a virtual environment (recommended)
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Set up your Gemini API key
Option 1: Environment Variable (Recommended)
# On Windows (Command Prompt) set GEMINI_API_KEY=your_api_key_here # On Windows (PowerShell) $env:GEMINI_API_KEY="your_api_key_here" # On macOS/Linux export GEMINI_API_KEY=your_api_key_here
Option 2: .env File Create a
.envfile in the root directory:GEMINI_API_KEY=your_api_key_here
-
Start the Flask server
python app.py
-
Open your browser and navigate to
http://localhost:5000 -
Explore!
- Click "Start Exploring" on the landing page
- Select a country from the dropdown
- Click "Explore Culture" to get AI-powered insights
- Landing Page: Welcome page with feature overview
- Main App:
- Select a country from the alphabetically sorted dropdown
- Click "Explore Culture" to generate cultural information
- View comprehensive insights about:
- Culture & Social Norms
- Traditions & Celebrations
- Architecture & Landmarks
- Cultural Nuances
- Search Another Country: Reset to explore more countries
GET /- Landing pageGET /app- Main application pagePOST /get-culture-info- Fetch cultural information for a selected country- Request body:
{"country": "Country Name"} - Response:
{"country": "Country Name", "information": "..."}
- Request body:
- Backend: Flask (Python)
- AI Integration: Google Gemini API
- Frontend: HTML5, CSS3, JavaScript (Vanilla)
- Styling: Custom CSS with gradient themes
Edit the COUNTRIES list in app.py:
COUNTRIES = [
"Your Country Here",
# ... other countries
]Modify the color variables in static/css/style.css:
/* Current blue gradient */
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
/* Change to your preferred colors */Modify the prompt in the get_culture_info() function in app.py to change what information Gemini provides.
- Ensure your API key is correctly set in environment variables
- Verify the key is valid at Google AI Studio
- Make sure all dependencies are installed:
pip install -r requirements.txt - Verify you're using the correct Python version (3.8+)
- Change the port in
app.py:app.run(port=5001)
Feel free to fork this project and customize it for your needs!
This project is open source and available for educational purposes.
Built with using Flask and Google Gemini AI