Skip to content

AI-powered summarization tool built with Flask and OpenAI's GPT model.

Notifications You must be signed in to change notification settings

jonathanpereda/smart-summarizer-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smart Summarizer API

Python Flask API using OpenAI’s GPT model to generate smart summaries.

Features

  • AI-generated summaries using GPT-3.5
  • Adjustable summary length: short, medium, or long
  • Optional style tone: formal or casual
  • JSON-based POST endpoint for easy integration

Example Request

curl -X POST http://127.0.0.1:5000/api/summarize \
-H "Content-Type: application/json" \
-d '{
  "text": "Your long input text here...",
  "length": "short",
  "style": "casual"
}'

Setup

  1. Clone this repo:
git clone https://github.com/jonathanpereda/smart-summarizer-api.git
cd smart-summarizer-api
  1. Create a virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Add your OpenAI API key to a .env file:
OPEN_API_KEY=your_key_here
  1. Run the app:
python app.py

Notes

  • Must have an OpenAI API key with available credits.
  • You can change the summary style and length using the optional request fields.

Author

Jonathan Pereda

About

AI-powered summarization tool built with Flask and OpenAI's GPT model.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages