Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📑 GPT Text Summarizer

GPT Summarizer

Transform lengthy content into concise summaries powered by OpenAI's GPT models

GitHub Streamlit License


✨ Features

  • 📄 Paste text or upload files (PDF, DOCX, TXT)
  • 🔍 Choose summary length: short, medium, or long
  • 🔐 Use your own OpenAI API key (optional)
  • 📊 See token usage and estimated cost
  • 💡 Clean UI built with Streamlit
  • ☁️ Deployable on Streamlit Cloud

🖼 Screenshot

---

🚀 Run Locally

1. Clone the repo

git clone https://github.com/abhimattx/SummarizerOpenAI.git
cd SummarizerOpenAI

2. Add your API key (local only)

Create .streamlit/secrets.toml and paste:

OPENAI_API_KEY = "sk-xxxxxxxxxxxxxxxx"

3. Install dependencies

pip install -r requirements.txt

4. Run the app

streamlit run app.py

🌐 Deploy on Streamlit Cloud

  1. Push this repo to GitHub
  2. Go to streamlit.io/cloud
  3. Connect your GitHub repo → Choose app.py
  4. In “Secrets”, add:
OPENAI_API_KEY = "sk-xxxxxxxxxxxxxxxx"

Done! ✅


📁 Project Structure

📁 Folder Structure

SummarizerOpenAI/
├── app.py                  # Streamlit UI
├── openai_api.py           # GPT summarizer logic
├── file_handler.py         # File upload reading logic
├── requirements.txt
├── .gitignore
├── README.md
├── .streamlit/
│   └── secrets.toml.example
└── assets/

📦 Requirements

streamlit
openai>=1.0.0
PyMuPDF           # For PDFs
python-docx       # For .docx files
tiktoken          # For token counting
pillow            # For image handling

💰 Cost Estimation

The app shows token usage and approximate cost:

  • GPT-3.5-turbo = ~$0.0015 per 1K tokens
  • Calculation is shown under each summary

🧑‍💻 Author

Abhishek Singh
LinkedInGitHub

📄 License

MIT – use it, remix it, build something great!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages