Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add text summarization.py #249

Closed
wants to merge 4 commits into from

Conversation

shivansh-2003
Copy link

Closes:

Describe the add-ons or changes you've made πŸ“ƒ

This Streamlit application is designed to perform text summarization using the Groq LLM. The app securely manages the Groq API key by retrieving it from Streamlit’s secrets.toml or environment variables, ensuring sensitive information is not hard-coded. The main function initializes the app, presenting a user-friendly interface with a text input area for users to provide the text they want to summarize. The app uses LangChain’s ChatPromptTemplate to define a summarization prompt that instructs the LLM to generate a concise summary in a structured JSON format. A JSON output parser ensures the output adheres to the expected format.

When the user enters text and clicks the β€œGenerate Summary” button, the app invokes a summarization chain that combines the prompt, Groq LLM, and the parser. If the input is valid and the API key is correctly configured, the result is displayed as a JSON-formatted summary on the interface. Error handling is included to manage cases like missing API keys or invalid input. This modular and secure implementation makes it easy to use advanced LLM capabilities for summarization in a clean and interactive interface.

Give a clear description of what have you added or modifications made

Checklist: β˜‘οΈ

  • My code follows the Contributing Guidelines & Code of Conduct of this project.
  • This PR does not contain plagiarized content.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly wherever it was hard to understand.
  • My changes generate no new warnings.

Working Video πŸ“·

https://vimeo.com/1043669798?share=copy#t=0

Copy link

github-actions bot commented Jan 3, 2025

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.

Copy link
Owner

@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.

Attach a jarvis integrated working video not independently.

.gitignore Outdated Show resolved Hide resolved
src/apps/pages/programs/ApiPrograms/text_summarization.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@jindalpriyanshu101 jindalpriyanshu101 left a comment

Choose a reason for hiding this comment

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

Code Looks good to me!, Approved.

@Avdhesh-Varshney
Copy link
Owner

@shivansh-2003 @jindalpriyanshu101 Nice work πŸ‘

But @shivansh-2003 Add a jarvis integrated working video to verify that it will be deployed perfectly without any error on streamlit.

@shivansh-2003
Copy link
Author

shivansh-2003 commented Jan 4, 2025

sir i made environment and pip install requirements.txt but was unable to run jarvis as system as it throws some errors distincting unable to detect some files that's why i am unable to integrate the summarization part with jarvis. to verify my code authenticity i have made a running video of serperate text summarization in streamlit

@Avdhesh-Varshney
Copy link
Owner

Avdhesh-Varshney commented Jan 4, 2025

sir i made environment and pip install requirements.txt but was unable to run jarvis as system as it throws some errors distincting unable to detect some files that's why i am unable to integrate the summarization part with jarvis

So, you can raise the github discussion and discuss about error you faced. I and other mentors are there to help you out.

  • Share your ss in github discussion and ping me or any mentor

@shivansh-2003
Copy link
Author

ok i will proceed to that

@jindalpriyanshu101
Copy link
Collaborator

Whats the update buddy? @shivansh-2003

@jindalpriyanshu101
Copy link
Collaborator

@shivansh-2003 We're expecting the requested video within 24hrs from you. Otherwise this PR will be dusted.

@jindalpriyanshu101
Copy link
Collaborator

PR Closed, time limit exceeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug πŸ› Something isn't working Flag: Inactive Status: Requested Changes Warning: Follow Guidelines https://github.com/Avdhesh-Varshney/Jarvis/issues/113
Projects
None yet
Development

Successfully merging this pull request may close these issues.

πŸ§‘β€πŸ’»: Text Summarization using groq api
3 participants