Skip to content

Conversation

@satyajit-patel
Copy link
Contributor

@satyajit-patel satyajit-patel commented Jun 16, 2025

Closes: #143

Enhanced Text Summarization with Groq API Integration

This PR upgrades the text summarization feature by replacing the local transformers pipeline with Groq's lightning-fast API, delivering significant performance improvements while maintaining the exact same user interface.

Working Video 📷

Text Summarization with Groq API Integration

Key Changes:

  • Performance Boost: 4-8x faster summarization (from 8-12s to 1-3s)
  • Quality Improvement: Upgraded from t5-small to Llama 3.1 8B model
  • Resource Optimization: Reduced memory usage from ~500MB to ~50MB
  • Security: Proper API key management through Streamlit secrets

Technical Implementation:

  • Replaced transformers pipeline with Groq API client
  • Maintained original function signatures and UI components
  • Added robust error handling for API key configuration

Files Modified/Added:

  • textSummarizationModel.py - Updated with Groq API integration
  • secrets.example.toml - Added API key configuration template

Before & After Comparison 📊

Before (t5-small model):
Before - t5-small Results

  • Slower processing time (8-12 seconds)
  • Basic summarization quality

After (Groq API with Llama 3.1 8B):
After - Groq API Results

  • Lightning-fast processing (1-3 seconds)
  • Superior summarization quality
  • Bug fix
  • New feature
  • Code style update (formatting, local variables)
  • Documentation update
  • Database update

@github-actions
Copy link

Thank you for submitting your pull request! We'll review it as soon as possible. For further communication, join our discord server https://discord.gg/tSqtvHUJzE.

@satyajit-patel
Copy link
Contributor Author

Hi @Avdhesh-Varshney ,
I've resolved the merge conflicts and pushed the updates.
Please review it again when convenient.
Thank you!

@satyajit-patel
Copy link
Contributor Author

Hi @Avdhesh-Varshney,
I've made the changes as discussed - removed versions from requirements.txt, added the API guide, and renamed the file to textSummarization. I've pushed the updates to the same branch. Please have a look when you get a chance.

@satyajit-patel
Copy link
Contributor Author

Hi @Avdhesh-Varshney ,
The feature is now working as expected. I’ve pushed the updated code and here is a working demo video: Video Link.
Please have a look and let me know if any further changes are needed.

Copy link
Member

@Avdhesh-Varshney Avdhesh-Varshney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

Copy link

@adityasingh-0803 adityasingh-0803 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🧑‍💻: Text Summarization using groq api

3 participants