This repository showcases four Natural Language Processing (NLP) projects using the Hugging Face Transformers library. Each project demonstrates different aspects of NLP, including question-answering, summarization, text generation, chatbot interactions, translation, sentiment analysis, and dataset handling.
- Objective: Extracting information from a given context using the question-answering model.
- Context: A narrative excerpt from a story.
- Sample Question: "Whose daughter is Aadhya?"
- Execution: Utilizes the MiniLM model from Hugging Face Transformers for question-answering.
- Objective: Generating an extractive summary of a given text.
- Text: A verbose passage on the founding of Facebook.
- Execution: Uses the DistilBERT-based summarization model for extracting key information.
- Objective: Generating synthetic text given an initial prompt.
- Prompt: "Natural Language Processing is a growing domain in machine learning."
- Execution: Utilizes the GPT-2 model for text generation, providing multiple synthetic outputs.
- Objective: Simulating a conversation with a chatbot.
- Conversation: Simulates a three-turn conversation with user inputs and bot responses.
- Execution: Uses the Blenderbot small model for conversational interactions.
- Objective: Translating a given English sentence to German and French.
- Source Sentence: "Leo part-1 and Salar part-1 are the biggest hits of 2023."
- Execution: Utilizes the T5 model for translation tasks.
- Objective: Analyzing the sentiment of given poems.
- Dataset: Uses a pre-labeled sentiment dataset from Hugging Face Datasets.
- Execution: Fine-tunes a DistilBERT model for sentiment classification and evaluates on a test dataset.
- Each project is organized in a separate folder with its own Python script.
- Follow the instructions within each project's folder to run the code and reproduce the results.
- Ensure you have the required dependencies installed by running
pip install -r requirements.txt
at the root of the repository.
Feel free to explore each project independently and adapt the code for your own NLP tasks. If you have any questions or suggestions, feel free to open an issue or reach out. Happy coding!