AI-powered chatbot that loads webpages and answers questions about their content using Google Gemini AI.
- 🌐 Load any public webpage
- 💬 Interactive chat with message history
- 🧠 AI responses using Google Gemini
- ⚡ Fast and efficient
- Python 3.8+
- Google API Key (Get one here)
git clone https://github.com/yourusername/webpage-assistant.git
cd webpage-assistantpip install streamlit langchain-google-genai langchain-core langchain-community python-dotenvCreate .env file:
GOOGLE_API_KEY=your_api_key_herewebpage-assistant/
├── chain.py # AI logic
├── main.py # Streamlit UI
├── .env # API key (create this)
├── requirements.txt # Dependencies
└── README.md # Documentation
streamlit run main.py- Load Page: Enter URL in sidebar and click "Load"
- Ask Questions: Type questions in chat input
- Get Answers: AI responds based on page content
"What is this page about?"
"Summarize the main points"
"Tell me about [specific topic] from this page"
"What are the key features mentioned?"
- Check
.envfile has correct key - Ensure no extra spaces
- Restart Streamlit server
pip install -r requirements.txt- Verify URL is correct
- Check URL is publicly accessible
- Try different webpage
- Cannot access login-required pages
- Works best with text-heavy content
- No JavaScript-rendered content
- One page at a time
- Session-based (history clears on refresh)
Made with ❤️ using Streamlit & LangChain