harheem's picture
Update README.md
a8a4801 verified

A newer version of the Gradio SDK is available: 5.34.2

Upgrade
metadata
title: i18n Agent - Contribute in Just 5 Minutes
emoji: πŸ€—
colorFrom: yellow
colorTo: yellow
sdk: gradio
sdk_version: 5.33.1
app_file: app.py
pinned: true
tags:
  - agent-demo-track
  - Agents-MCP-Hackathon

🌐 [i18n-agent] Hugging Face i18n made easy

AI-powered translation agent for Hugging Face Transformers documentation internationalization

Hugging Face Spaces agent-demo-track

KREW x Hugging Face Logo

Streamline Hugging Face Transformers documentation translation with Claude AI
β€’ Auto-generate GitHub PRs β€’ Multi-language support

🎯 Created to address Hugging Face Transformers Issue #20179 - Making documentation translation more accessible and automated for the global community.

πŸš€ Try Live Demo β€’ πŸ“Ή Watch Demo β€’ πŸ“– Documentation


✨ What is this?

Transform the way you contribute to Hugging Face Transformers' global community! This AI agent automatically:

  • πŸ” Discovers missing translations in Transformers documentation
  • πŸ€– Translates using Claude Sonnet 4 with technical precision
  • πŸ“ Creates GitHub pull requests ready for review on huggingface/transformers
  • πŸ’¬ Guides you through the entire process

Perfect for: Contributors addressing Issue #20179, documentation maintainers, and international communities wanting to make transformer models accessible worldwide.

🎯 Addressing the Community Need

This project was specifically created to solve Hugging Face Transformers Issue #20179, which highlights the need for better internationalization tooling. Our agent tackles the core challenges mentioned in the issue:

  • 🚧 Translation Bottlenecks: Automates the manual translation process
  • πŸ“Š Consistency Issues: Maintains uniform translation quality within each languages
  • ⚑ Scalability Problems: Handles batch translations efficiently
  • 🀝 Contributor Barriers: Simplifies the PR creation workflow for translators

πŸŽ₯ Demo Video

Click image to link to demo video image/png πŸ”— https://youtu.be/Xym6w9bMQXM

Watch the complete walkthrough: from setup to PR creation in under 5 minutes

πŸš€ Quick Start

Option 1: One-Click Demo (Recommended)

Open in Spaces

βœ… No setup required! Just click and start translating.
βœ… Pre-requisites! Need Anthropic API key and Github token.

Option 2: Run Locally

πŸ› οΈ Local Installation Guide
# Clone the repo
git clone https://github.com/Hugging-Face-KREW/i18n-agent.git
cd i18n-agent

# Install dependencies  
pip install -r requirements.txt

# Set up your keys
cp .env.example .env
# Add your Anthropic API key and GitHub token

# Launch the app
python app.py

🎯 How It Works

This agent specifically targets the Hugging Face Transformers documentation and submits PRs addressing Issue #20179 in the huggingface/transformers repository.

KREW x Hugging Face Logo

Step 1: πŸ” Discover Translation Targets

  • Select your target language (Korean, and more languages will be supported)
  • Set how many files to process
  • Let AI identify the most impactful Transformers docs translations

Step 2: πŸ€– Smart Translation

  • Enter your Anthropic API key
  • Claude Sonnet 4 translates with context awareness
  • Technical terms and code blocks preserved automatically

Step 3: πŸ“ Automated PR Creation

  • Configure GitHub credentials
  • System creates properly formatted pull requests for huggingface/transformers
  • Optional: Use reference PRs for consistency

🌍 Supported Languages

Language Code Status
πŸ‡°πŸ‡· Korean ko βœ… Fully Supported

And more languages coming soon...

πŸ—οΈ Architecture

πŸ“Š System Design Overview

Frontend Layer

  • Gradio web interface with modern styling
  • Real-time chat & quick controls with AI agent
  • Progress tracking missing

AI Processing Layer

  • File discovery with intelligent prioritization for Transformers docs
  • Claude Sonnet 4 for context-aware translation
  • LangChain integration for PR research

Integration Layer

  • GitHub API for automated PR creation to huggingface/transformers
  • Branch management and commit structuring
  • Template matching from reference PRs

βš™οΈ Configuration

For Spaces Deployment

Prepare these secrets:

ANTHROPIC_API_KEY=your_claude_api_key
GITHUB_TOKEN=your_github_token  

For Local Development

Create .env file:

ANTHROPIC_API_KEY=<your api key>

# GitHub PR Agent Configuration
GITHUB_TOKEN=<your github token>
GITHUB_OWNER=<your github username>
GITHUB_REPO=<your repository name>
REFERENCE_PR_URL=<reference pr url for style analysis>

🀝 Contributing

Love this project? Here's how you can help:

Fork Star Issues

πŸ‘₯ Contributors

πŸ€— [email protected] / @harheem
πŸ€— [email protected] / @Jwaminju

πŸ’‘ Use Cases

🌟 Real-world scenarios where this agent shines:

  • πŸ“š Documentation Teams: Batch translate Transformers documentation updates
  • 🌍 Community Contributors: Help make Transformers accessible in your language
  • 🏒 Organizations: Streamline i18n workflows for Transformers library
  • πŸ‘¨β€πŸ’» Developers: Contribute Transformers translations without manual GitHub workflow
  • 🎯 Issue #20179 Contributors: Directly address the internationalization challenges raised by the community

πŸ› οΈ Tech Stack

Python Gradio Anthropic GitHub LangChain

❓ FAQ

Q: How does this relate to Issue #20179?
This agent directly addresses the pain points raised in Issue #20179 by automating the translation workflow, reducing manual overhead, and making it easier for contributors to submit high-quality translations.
Q: How accurate are the translations?
The agent uses Claude Sonnet 4, which provides high-quality translations with technical context awareness. It preserves code blocks, maintains formatting, and follows established translation patterns.
Q: What permissions do I need for GitHub integration?
Your GitHub token needs repository read/write permissions and the ability to create branches and pull requests on the target repository.
Q: Can I customize the translation style?
Yes! You can provide reference PR URLs to match existing translation patterns and maintain consistency with community standards.

πŸ› Troubleshooting

Common Issues

API Key Issues
  • Ensure your Anthropic API key is valid and has sufficient credits
  • Check that your GitHub token has the necessary repository permissions
Translation Quality
  • The system uses Claude Sonnet 4 for high-quality translations
  • Formatting and markdown structure is maintained
  • Please restart the translation again if you met format issue
GitHub PR Creation
  • Verify repository permissions and branch protection rules
  • Check that the reference PR URL is accessible and valid

πŸ™ Acknowledgments

Special thanks to the amazing communities that make this possible:

  • πŸ€— Hugging Face - For building the Transformers library and comprehensive documentation
  • 🎭 Anthropic - For Claude's incredible language capabilities
  • πŸ‘₯ Hugging Face KREW Community - For championing Korean AI translation
  • 🎨 Gradio - For making beautiful AI interfaces simple
  • 🌍 Community Contributors - For raising awareness through Issue #20179

Made with ❀️ for global accessibility of Hugging Face Transformers documentation.

🎯 Solving Issue #20179 one translation at a time.

⭐ Star this repo β€’ πŸ› Report Bug β€’ πŸ’‘ Request Feature