{"id":29109579,"url":"https://github.com/shuyib/hf_model_preview","last_synced_at":"2025-06-29T07:03:58.611Z","repository":{"id":287413791,"uuid":"964652444","full_name":"Shuyib/HF_model_preview","owner":"Shuyib","description":"Using LLMs in huggingface for sentiment analysis, translation, summarization and extractive question answering","archived":false,"fork":false,"pushed_at":"2025-05-26T10:22:51.000Z","size":159,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-26T11:42:21.055Z","etag":null,"topics":["decoder-model","encoder-model","explainable-ai","extractive-question-answering","facebook-bart","helsinki-nlp","llm","llm-inference","question-answering","qwen2-5","sentiment-analysis","summarization","translation"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shuyib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-11T15:02:31.000Z","updated_at":"2025-05-26T10:23:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"47a2d6a2-72cd-4d91-bb9b-0a4db0a0585a","html_url":"https://github.com/Shuyib/HF_model_preview","commit_stats":null,"previous_names":["shuyib/hf_model_"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Shuyib/HF_model_preview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuyib%2FHF_model_preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuyib%2FHF_model_preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuyib%2FHF_model_preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuyib%2FHF_model_preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shuyib","download_url":"https://codeload.github.com/Shuyib/HF_model_preview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuyib%2FHF_model_preview/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262553192,"owners_count":23327587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decoder-model","encoder-model","explainable-ai","extractive-question-answering","facebook-bart","helsinki-nlp","llm","llm-inference","question-answering","qwen2-5","sentiment-analysis","summarization","translation"],"created_at":"2025-06-29T07:03:38.973Z","updated_at":"2025-06-29T07:03:58.605Z","avatar_url":"https://github.com/Shuyib.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Shuyib/HF_model_preview/HEAD)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Shuyib/HF_model_preview/blob/master/notebook.ipynb)\n\n\n# Car-ing is Sharing: LLM Model Review\n\n![Car-ing is Sharing](car.jpeg)\n\n## Project Overview\n\nThis project evaluates various Hugging Face large language models (LLMs) for a car dealership chatbot application called \"Car-ing is Sharing\". The chatbot is designed to assist customers and provide support to human agents through multiple NLP functionalities.\n\n### Key Features\n\n- **Sentiment Analysis**: Classify car reviews as positive or negative\n- **Text Translation**: Translate customer reviews between English and Spanish\n- **Question Answering**: Extract specific information from car reviews\n- **Text Summarization**: Generate concise summaries of longer car reviews\n\n## Project Structure\n\n```\n.\n├── car.jpeg                   # Project image\n├── Makefile                   # Build automation\n├── notebook.ipynb             # Main analysis notebook\n├── requirements.txt           # Project dependencies\n└── data/\n    ├── car_reviews.csv        # Car review dataset\n    └── reference_translations.txt # Translation reference data\n```\n\n## Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/Shuyib/HF_model_preview.git\ncd HF_model_review\n```\n\n2. Create and activate a virtual environment:\n\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n```\n\n3. Install dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n## Models Used\n\nThis project leverages several pre-trained models:\n\n- **Sentiment Analysis**:\n  - `distilbert-base-uncased-finetuned-sst-2-english`\n  - `Qwen/Qwen2.5-1.5B-Instruct` (via API)\n\n- **Translation**:\n  - `Helsinki-NLP/opus-mt-en-es`\n\n- **Question Answering**:\n  - `deepset/minilm-uncased-squad2`\n\n- **Summarization**:\n  - `cnicu/t5-small-booksum`\n  - `facebook/bart-large-cnn`\n\n## Usage\n\n1. Open the Jupyter notebook:\n\n```bash\njupyter notebook notebook.ipynb\n```\n\n2. Run the cells to see model evaluations for:\n   - Sentiment analysis with accuracy and F1 metrics\n   - Translation quality with BLEU score calculation\n   - Question answering capabilities\n   - Text summarization quality\n\n## API Access\n\nFor some models, you'll need to set up API access from huggingface.co. You can do this by creating a token on your Hugging Face account and setting it as an environment variable:\n\n```bash\nexport HF_token=\"your_huggingface_token\"\n```\n\n```python\nimport os\nos.environ[\"HF_TOKEN\"] = \"your_huggingface_token\"\n```\n\n## Development\n\nThis project includes a comprehensive Makefile with useful commands:\n\n- `make install`: Set up the environment\n- `make format`: Format code\n- `make lint`: Lint code\n- `make test`: Run tests\n- `make clean`: Clean up environment\n\nRun `make help` to see all available commands.\n\n## Requirements\n\n- Python 3.10 or higher (Used 3.11.9)\n- See requirements.txt for Python dependencies:\n  - transformers\n  - evaluate\n  - datasets\n  - sentencepiece\n  - openai\n  - tenacity\n  - ipykernel\n  - torch\n\n## License\n\n[Creative Common License v1.0 Universal](https://github.com/Shuyib/HF_model_preview/blob/main/LICENSE)\n\n## Acknowledgments\n\n- Hugging Face for providing the model infrastructure\n- Datasets are from [Datacamp projects](https://app.datacamp.com/learn/projects/2046)\n- Special thanks to the teams behind the pre-trained models used in this project such as the Helsinki-NLP, Qwen team, and Facebook teams.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuyib%2Fhf_model_preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuyib%2Fhf_model_preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuyib%2Fhf_model_preview/lists"}