BrainAI is a small Python web application built with Flask. It serves a chat page and accepts user messages through a POST endpoint, then passes the prompt to the project's Gemini integration and returns the generated response.
- Flask-powered web interface
- Chat page rendered from a Jinja template
- POST endpoint for sending prompts
- Vietnamese language preference configured for the Gemini client
| Component | Purpose |
|---|---|
| Python | Application runtime |
| Flask | Web server and routing |
| Flask-Bootstrap | Bootstrap integration |
| Jinja | HTML template rendering |
| Gemini integration | Prompt response generation |
.
├── app.py # Flask application and /get endpoint
├── config.py # Local integration configuration
├── templates/
│ └── index.html # Chat interface
└── static/ # Frontend assets, if present
This repository is public and can be cloned with Git:
git clone https://github.com/sor1209/python-BrainAI.git
cd python-BrainAI- Python 3
- The Python packages imported by
app.py - A working configuration for the Gemini integration used by this project
Install the web framework dependencies:
python -m pip install Flask Flask-BootstrapThe repository also imports a Gemini client module. Install or provide that dependency according to the version used by this project; the repository does not currently include a standard requirements.txt manifest.
From the repository root:
python app.pyThe Flask development server is configured to listen on port 5000. Open:
http://127.0.0.1:5000
| Method | Route | Purpose |
|---|---|---|
| GET | / |
Render the chat interface |
| POST | /get |
Submit a prompt and return the generated response |
The current integration uses account-session cookie values through local configuration. Treat those values as secrets:
- Never commit real session cookies or account credentials.
- Keep private configuration out of public repositories.
- Do not expose this development server directly to the public internet.
- The app currently starts Flask with
debug=True; disable debug mode and add appropriate authentication, validation, and production hosting controls before deployment. - Review the upstream Gemini integration for compatibility and service-policy changes.
This repository is an experimental chat interface, not a production-ready AI service.
BrainAI · Python × Flask