This is a Streamlit-based AI chatbot that leverages Google Gemini API to provide intelligent responses to data science-related queries. The chatbot supports multi-chat sessions, AI summarization, PDF export, dark mode, IP banning, and more.
β
Multi-Chat Support β Users can create and switch between multiple chat sessions.
β
AI-Powered Responses β Uses Google Gemini API for intelligent and context-aware responses.
β
Delete Chat Option β Easily remove old conversations from the chat history.
β
Real-time Streaming β Responses appear dynamically as they are generated.
β
PDF Export β Save chat conversations as PDF files.
β
Dark Mode β Enhanced UI experience for users.
β
AI Summarization β Summarizes chat history for quick reference.
β
IP Banning System β Prevents unauthorized access based on IP addresses.
git clone https://github.com/AbhishekKantharia/AIConversationalDataScienceTutor.git
cd AIConversationalDataScienceTutorEnsure you have Python installed, then run:
pip install -r requirements.txtCreate a .env file in the root directory and add:
GOOGLE_API_KEY=your_google_gemini_api_key
ADMIN_PASSWORD=your_admin_passwordstreamlit run app.pyπ ai-ds-tutor
βββ app.py # Main Streamlit application
βββ requirements.txt # Required Python packages
βββ chat_sessions.pkl # Stored chat sessions (auto-generated)
βββ banned_ips.pkl # Banned IPs list (auto-generated)
βββ .env # API keys and admin password
βββ README.md # Documentation
1οΈβ£ Ask a Question β Type a data science-related question in the chat input.
2οΈβ£ Multi-Chat Support β Create and switch between multiple chat sessions in the sidebar.
3οΈβ£ Delete Chat β Remove a conversation using the "ποΈ Delete Chat" button.
4οΈβ£ Enable Dark Mode β Switch to dark mode for better readability.
5οΈβ£ Export Chat to PDF β Save your chat for later reference.
- The app can ban users based on IP addresses.
- Banned users will see a "π« Your IP has been banned." message.
- AI can generate summaries for long conversations, making it easier to review.
To customize colors and styling, edit the CSS inside app.py:
st.markdown(
"""
<style>
body { background-color: #121212; color: #e0e0e0; }
.stSidebar { background-color: #181818; }
</style>
""",
unsafe_allow_html=True
)To use a different Google Gemini AI model, change this line in app.py:
LATEST_GEMINI_MODEL = "gemini-1.5-pro-latest"πΉ Improve response streaming for faster replies.
πΉ Add a user authentication system for chat history security.
πΉ Support file uploads for AI-based code reviews.
πΉ Enhance PDF export formatting for better readability.
Contributions are welcome! Feel free to submit a pull request or open an issue.
This project is licensed under the MIT License.
π Enjoy your AI-powered Data Science Chatbot! π