Skip to content

mustafa-kamel/openai-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Summarizer

Flask Summarizer is a Python application that utilizes Flask and OpenAI to summarize lengthy blogs into concise paragraphs with ease.

Features

  • Summarize lengthy blog posts into brief, insightful paragraphs.
  • Integration with OpenAI for advanced natural language processing capabilities.
  • Simple HTTP request interface for easy interaction.
  • Customizable summarization parameters.
  • Robust error handling and response validation.
  • Lightweight and efficient Flask framework for deployment and scalability.

Installation

  1. Clone the repository:
git clone [email protected]:mustafa-kamel/openai-service.git
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up your OpenAI API key by replacing 'YOUR_API_KEY' in the code with your actual key.

Usage

To use the Flask Summarizer API, follow these steps:

  1. Run the Flask application:
python app.py
  1. Send a POST request to the /summarize-blog endpoint with a JSON payload containing the blog text.

Example:

curl -X POST -H "Content-Type: application/json" -d '{"blog_text": "Replace this with your blog text."}' http://localhost:5000/summarize-blog

About

Flask Summarizer: Utilize Flask and OpenAI to summarize lengthy blogs effortlessly.

Topics

Resources

License

Stars

Watchers

Forks

Languages