--- title: NLPToolkit emoji: 💬 colorFrom: yellow colorTo: purple sdk: gradio sdk_version: 5.11.0 app_file: app.py pinned: false --- Here is a sample README.md with GitHub badges: # NLPToolkit Agent - Gradio Chatbot [![Python](https://img.shields.io/badge/python-%3E%3D%203.7-blue)](https://www.python.org/) [![Gradio](https://img.shields.io/badge/Gradio-v3.27.0-orange)](https://gradio.app/) [![Hugging Face](https://img.shields.io/badge/Hugging%20Face-open--assistant--oasst--sft--4--pythia--12b--epoch--3.5-green)](https://huggingface.co/OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5) [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE) NLPToolkit Agent is a powerful NLP chatbot powered by Hugging Face and Gradio, designed to assist with a variety of NLP tasks including summarization, sentiment analysis, text classification, and entity recognition. It allows users to interact with the model dynamically and adjust parameters like temperature, max tokens, and top-p for better control over the output. ## Features - **Multiple NLP Tasks**: Perform tasks like summarization, sentiment analysis, text classification, and entity recognition. - **Dynamic Task Selection**: Choose your desired NLP task from a dropdown menu. - **Chat History**: Save and load conversation history for reference or further interaction. - **Language Detection**: Preprocess user input for language validation and display error messages if the input language is unsupported. - **Model Parameters Control**: Fine-tune the model's behavior using sliders for max tokens, temperature, and top-p (nucleus sampling). - **Powered by Hugging Face and Gradio**: Utilize state-of-the-art models hosted on Hugging Face with an intuitive Gradio interface. ## Requirements - Python 3.7 or higher - Gradio 3.27.0 - Hugging Face `huggingface_hub` for model inference - `langdetect` for language detection Install the dependencies by running: ```bash pip install -r requirements.txt '''' Usage 1. Clone the repository: git clone https://github.com/yourusername/nlptoolkit-agent.git cd nlptoolkit-agent 2. Run the application: python app.py This will start the Gradio interface, which you can access via your browser at http://localhost:7860. 3. Interact with the Chatbot:       •   Select an NLP task (Summarization, Sentiment Analysis, etc.).       •   Type your message in the input field and click “Generate Response.”       •   Adjust parameters (max tokens, temperature, top-p) for more fine-tuned responses.       •   Save and load chat history using the respective buttons. Model Used The application uses the Hugging Face model OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5. You can modify the model to any other compatible model from Hugging Face if desired. License This project is licensed under the MIT License - see the LICENSE file for details. Contributing Feel free to fork this repository and submit pull requests. Contributions are welcome! Acknowledgments    •   Hugging Face for providing the pre-trained NLP models.    •   Gradio for the amazing tool to create user interfaces for machine learning models.    •   OpenAssistant for their contribution to the model. Developed by Canstralian ---