A conversational chatbot built using Streamlit and Ollama, designed to interact with users, process queries, and generate responses using AI models. It also includes the functionality to save chat conversations as PDF files.
- Interactive Chat Interface: Communicate seamlessly with the chatbot.
- Model Selection: Choose from available AI models provided by Ollama.
- PDF Export: Save chat conversations as downloadable PDF files.
- User-Friendly UI: Responsive and clean design using Streamlit.
- Python: Core programming language.
- Streamlit: Frontend for chatbot UI.
- Ollama: Backend AI model provider.
- FPDF: PDF generation library.
-
Clone the Repository:
git clone https://github.com/your-username/ollama-chatbot.git cd ollama-chatbot
-
Ollama Setup:
- Download Ollama: Ollama Download Page
- Explore Model Library: Ollama Model Library
-
Install Dependencies:
- Streamlit: Installation Guide
pip install streamlit
- Ollama:
pip install ollama
- Pull and Verify Model:
ollama pull {model: model_library} ollama list ollama run {pulled_model}
- FPDF:
pip install fpdf
- Streamlit: Installation Guide
-
Run the Application:
streamlit run chatBot.py
-
Select an AI Model:
- Use the dropdown to pick an available Ollama model.
-
Start Chatting:
- Type your message in the chat input field and interact with the AI.
-
Save Chat as PDF:
- Click on "Save as PDF" to download the chat conversation.
ollama-chatbot/
├── chatBot.py # Main application file
├── fonts/ # Folder for font files
├── response-pdf/ # Folder for saving generated PDFs
├── README.md
- If no model is selected, an error message will prompt the user.
- Any unexpected errors will be displayed in the Streamlit interface.
Check Out Video Tutorial Here: Click Here to Watch Video Tutorial
Enjoy building with Ollama Chatbot! 🤖✨
Developed by Nishchal Kansara using Ollama
- Personal Website: https://nishchal-kansara.web.app/
- Resume: https://nishchal-kansara.web.app/resume.html
Connect with me on LinkedIn: Nishchal Kansara