Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add Telugu Sentiment Classification Example using DistilBERT#41895

Open
Sai-Lakshmi-Bala-Mounika-Gandikota wants to merge 1 commit into
huggingface:mainfrom
Sai-Lakshmi-Bala-Mounika-Gandikota:te-sentiment-example
Open

Add Telugu Sentiment Classification Example using DistilBERT#41895
Sai-Lakshmi-Bala-Mounika-Gandikota wants to merge 1 commit into
huggingface:mainfrom
Sai-Lakshmi-Bala-Mounika-Gandikota:te-sentiment-example

Conversation

@Sai-Lakshmi-Bala-Mounika-Gandikota

@Sai-Lakshmi-Bala-Mounika-Gandikota Sai-Lakshmi-Bala-Mounika-Gandikota commented Oct 27, 2025

Copy link
Copy Markdown

What does this PR do?

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

What does this PR do?

This PR introduces a new example under examples/te_sentiment for Telugu Sentiment Analysis using the transformers library.
It fine-tunes the multilingual model distilbert-base-multilingual-cased on a small Telugu dataset to classify sentiment as Positive, Negative, or Neutral.

Why is this needed?

Currently, there are no examples in the repository demonstrating sentiment analysis for Telugu, one of the major Indian languages.
This contribution expands multilingual support and showcases how Hugging Face models can be fine-tuned effectively on low-resource languages.

Key Features

  • run_te_sentiment.py: Training script using Hugging Face Trainer API.
  • README.md: Explains dataset preparation, training commands, and evaluation metrics.
  • Uses datasets library for seamless data loading and preprocessing.
  • Lightweight configuration to allow users to fine-tune models on small datasets.

Test Plan

  • Verified that the example runs successfully on a local environment with GPU.
  • Ensured model fine-tuning completes and evaluation metrics (accuracy, F1) are printed.
  • Checked README instructions for clarity and correctness.

Related Issues

None.

Checklist

  • I have read and followed the Contributing Guidelines.
  • The code runs without errors using the provided dataset.
  • Documentation and comments are included.
  • No existing functionality is broken.

@stevhliu @ArthurZucker @Cyrilvallez — Please review this PR.
This adds a new Telugu sentiment classification example under examples/te_sentiment. 😊

@Sai-Lakshmi-Bala-Mounika-Gandikota

Copy link
Copy Markdown
Author

Hi @stevhliu @ArthurZucker @Cyrilvallez 👋
I’ve added a new example for Telugu Sentiment Classification under examples/te_sentiment.
It demonstrates fine-tuning distilbert-base-multilingual-cased on a small Telugu dataset.
Please review this PR when you get a chance — thank you! 😊

@Sai-Lakshmi-Bala-Mounika-Gandikota

Copy link
Copy Markdown
Author

Hi 👋, I’m participating in Hacktoberfest 2025!
Could you please add the hacktoberfest-accepted label if this PR qualifies?
Thank you for reviewing and supporting contributors 🌸

@vjaykrsna

Copy link
Copy Markdown

What are you trying to do? 🤔

@Sai-Lakshmi-Bala-Mounika-Gandikota

Copy link
Copy Markdown
Author

Hi @vjaykrsna 👋
I’m contributing a new example script called te_sentiment, which demonstrates Telugu Sentiment Classification using distilbert-base-multilingual-cased.
The goal is to add multilingual coverage for Indian languages in the examples section.
It includes:

run_te_sentiment.py — for fine-tuning on a small Telugu dataset

README.md — explaining dataset, training steps, and results

I wanted to make this contribution as part of Hacktoberfest 2025 while also adding real value to the repository. 😊

@vjaykrsna

Copy link
Copy Markdown

I see,
Keep up the good work
I was afraid to see two empty files at first 😅

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants