Skip to content

omni-front/Streamlit-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Streamlit PDF Chatbot 🤖

An AI-powered chatbot built with Streamlit that allows users to upload PDF documents and have interactive conversations about their content using OpenAI and LangChain.

Features

  • PDF Upload & Processing — Upload single or multiple PDF files for analysis
  • Conversational Q&A — Ask questions about your documents in natural language
  • Vector Search — Uses FAISS for efficient semantic similarity search
  • Conversation Memory — Maintains chat context across multiple questions
  • Animated UI States — Visual feedback with animated states (reading, thinking, welcoming)

Tech Stack

Python Streamlit LangChain OpenAI

  • LLM: OpenAI GPT-3.5 Turbo
  • Embeddings: OpenAI Embeddings
  • Vector Store: FAISS
  • Text Processing: LangChain CharacterTextSplitter
  • PDF Parsing: PyPDF2
  • Framework: Streamlit

How It Works

PDF Upload → Text Extraction → Chunking → Embeddings → FAISS Vector Store
                                                            ↓
User Question → Semantic Search → Relevant Chunks → LLM → Answer

Setup

  1. Clone the repository
git clone https://github.com/nofaukost/Streamlit-Chatbot.git
cd Streamlit-Chatbot
  1. Install dependencies
pip install -r requirements.txt
  1. Set up environment variables
echo "OPENAI_API_KEY=your_api_key_here" > .env
  1. Run the app
streamlit run app.py

Project Structure

├── app.py              # Main Streamlit application
├── htmlTemplates.py    # HTML/CSS templates for chat UI
├── requirements.txt    # Python dependencies
├── *.gif               # Animated UI state indicators
└── .env                # Environment variables (not tracked)

License

MIT

About

PDF-upload chatbot built with Streamlit and OpenAI for document Q&A

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors