Skip to content

This project is an LLM-powered Streamlit application that enables users to chat with any webpage and extract meaningful insights in real time. By combining LangChain, Gemini API, and a vector-based Retrieval-Augmented Generation (RAG) pipeline, the app delivers accurate, context-aware answers from live web content.

Notifications You must be signed in to change notification settings

GarimaaS/WebPage-Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebPage Assistant 🤖📄

AI-powered chatbot that loads webpages and answers questions about their content using Google Gemini AI.


✨ Features

  • 🌐 Load any public webpage
  • 💬 Interactive chat with message history
  • 🧠 AI responses using Google Gemini
  • ⚡ Fast and efficient

📦 Prerequisites


🚀 Installation

1. Clone Repository

git clone https://github.com/yourusername/webpage-assistant.git
cd webpage-assistant

2. Install Dependencies

pip install streamlit langchain-google-genai langchain-core langchain-community python-dotenv

3. Setup Environment

Create .env file:

GOOGLE_API_KEY=your_api_key_here

📁 Project Structure

webpage-assistant/
├── chain.py          # AI logic
├── main.py           # Streamlit UI
├── .env              # API key (create this)
├── requirements.txt  # Dependencies
└── README.md         # Documentation

🎯 Usage

Start Application

streamlit run main.py

How to Use

  1. Load Page: Enter URL in sidebar and click "Load"
  2. Ask Questions: Type questions in chat input
  3. Get Answers: AI responds based on page content

💡 Example Queries

"What is this page about?"
"Summarize the main points"
"Tell me about [specific topic] from this page"
"What are the key features mentioned?"

🐛 Troubleshooting

API Key Error

  • Check .env file has correct key
  • Ensure no extra spaces
  • Restart Streamlit server

Module Not Found

pip install -r requirements.txt

Page Won't Load

  • Verify URL is correct
  • Check URL is publicly accessible
  • Try different webpage

⚠️ Limitations

  • 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

About

This project is an LLM-powered Streamlit application that enables users to chat with any webpage and extract meaningful insights in real time. By combining LangChain, Gemini API, and a vector-based Retrieval-Augmented Generation (RAG) pipeline, the app delivers accurate, context-aware answers from live web content.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages