A clean and modern web application that uses AI to generate concise summaries from user-provided text. Built with Django for the backend and styled with a sleek, Apple-inspired frontend using Tailwind CSS.
- AI-Powered Summarization: Generate precise summaries using the Hugging Face API.
- Minimalistic Design: Inspired by Apple's design principles for a clean and modern user interface.
- Responsive Layout: Works seamlessly across desktops, tablets, and mobile devices.
- Fast and Efficient: Provides summaries within seconds with a simple copy-paste workflow.
- Text Length: The input text is processed in chunks of up to 500 words for optimal summarization. Longer texts are split and summarized individually.
- Summary Length: The summarized output is dynamically determined based on the input text length:
- Short Inputs: Summaries are concise, with a minimum of 30 words and a maximum of 50 words.
- Long Inputs: Summaries can go up to 150 words but are constrained by the capabilities of the Hugging Face API.
- API Limits: The app relies on the Hugging Face API, so response time and accuracy depend on their service availability.
- Context Preservation: For very large texts, summaries are generated for individual chunks and then combined. This may lead to slightly reduced coherence across combined summaries.
- Python 3.8+
- Django 4.x
- Node.js & npm (for Tailwind CSS)
- Hugging Face API key
git clone https://github.com/obiwan04kanobi/text_summarizer.git
cd text_summarizer
- Install Dependencies
pip install -r requirements.txt
- Run Database Migrations
python manage.py migrate
- Start the Development Server
python manage.py runserver
- Install Tailwind CSS
Navigate to thestatic
folder:cd static npm install
- Build Tailwind Styles
npx tailwindcss -i ./src/input.css -o ./css/output.css --watch
- Access the app locally at
http://127.0.0.1:8000
. - Paste your text into the input field.
- Click "Summarize" to generate a concise summary.
- The summary will appear below the input box.
This project integrates with the Hugging Face API for text summarization. To enable API access:
- Sign up at Hugging Face and get your API key.
- Create a
.env
file in the root directory:HUGGING_FACE_API_KEY=your_api_key_here
The UI takes inspiration from Apple's design methodology:
- Minimalism: Clean and distraction-free interfaces.
- Subtle Interactions: Smooth transitions and hover effects for a polished experience.
- Responsive and Accessible: Ensuring usability across all devices and for all users.
Contributions are welcome!
- Fork the repository.
- Create a feature branch (
git checkout -b feature-name
). - Commit your changes (
git commit -m "Add feature"
) and push (git push origin feature-name
). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
👤 Mayank Pant