harheem jmj-minju commited on
Commit
c76aa2a
Β·
verified Β·
1 Parent(s): e0e9eb4

Update README.md (#1)

Browse files

- Update README.md (e93517d4666d0fa628fb90eb566ed3d9eefab604)


Co-authored-by: Minju Jwa <[email protected]>

Files changed (1) hide show
  1. README.md +300 -1
README.md CHANGED
@@ -7,4 +7,303 @@ sdk: gradio
7
  sdk_version: 5.33.1
8
  app_file: app.py
9
  pinned: false
10
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  sdk_version: 5.33.1
8
  app_file: app.py
9
  pinned: false
10
+ tags:
11
+ - agent-demo-track
12
+ - Agents-MCP-Hackathon
13
+ ---
14
+
15
+
16
+ <div align="center">
17
+
18
+ # 🌐 [i18n-agent] Hugging Face i18n made easy
19
+
20
+ *AI-powered translation agent for Hugging Face Transformers documentation internationalization*
21
+
22
+ [![Hugging Face Spaces](https://img.shields.io/badge/πŸ€—%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/Agents-MCP-Hackathon/hf-transformers-docs-i18n-agent)
23
+ [![agent-demo-track](https://img.shields.io/badge/πŸ€–-agent--demo--track-ff6b6b)](https://github.com/topics/agent-demo-track)
24
+
25
+ ![KREW x Hugging Face Logo](images/title.png)
26
+
27
+ **Streamline Hugging Face Transformers documentation translation with Claude AI**
28
+ β€’ **Auto-generate GitHub PRs** β€’ **Multi-language support**
29
+
30
+ > 🎯 **Created to address [Hugging Face Transformers Issue #20179](https://github.com/huggingface/transformers/issues/20179)** - Making documentation translation more accessible and automated for the global community.
31
+
32
+ [πŸš€ Try Live Demo](https://huggingface.co/spaces/Agents-MCP-Hackathon/hf-transformers-docs-i18n-agent) β€’ [πŸ“Ή Watch Demo](#-demo-video) β€’ [πŸ“– Documentation](#-quick-start)
33
+
34
+ </div>
35
+
36
+ ---
37
+
38
+ ## ✨ What is this?
39
+
40
+ Transform the way you contribute to Hugging Face Transformers' global community! This AI agent automatically:
41
+
42
+ - πŸ” **Discovers** missing translations in [Transformers documentation](https://huggingface.co/docs/transformers/en/index)
43
+ - πŸ€– **Translates** using Claude Sonnet 4 with technical precision
44
+ - πŸ“ **Creates** GitHub pull requests ready for review on [huggingface/transformers](https://github.com/huggingface/transformers)
45
+ - πŸ’¬ **Guides** you through the entire process
46
+
47
+ > **Perfect for**: Contributors addressing [Issue #20179](https://github.com/huggingface/transformers/issues/20179), documentation maintainers, and international communities wanting to make transformer models accessible worldwide.
48
+
49
+ ## 🎯 Addressing the Community Need
50
+
51
+ This project was specifically created to solve [Hugging Face Transformers Issue #20179](https://github.com/huggingface/transformers/issues/20179), which highlights the need for better internationalization tooling. Our agent tackles the core challenges mentioned in the issue:
52
+
53
+ - **🚧 Translation Bottlenecks**: Automates the manual translation process
54
+ - **πŸ“Š Consistency Issues**: Maintains uniform translation quality within each languages
55
+ - **⚑ Scalability Problems**: Handles batch translations efficiently
56
+ - **🀝 Contributor Barriers**: Simplifies the PR creation workflow for translators
57
+
58
+ ## πŸŽ₯ Demo Video
59
+
60
+ [![Hugging Face i18n Agent Demo](https://img.youtube.com/vi/YOUR_VIDEO_ID/maxresdefault.jpg)](https://www.youtube.com/watch?v=YOUR_VIDEO_ID)
61
+
62
+ *Watch the complete walkthrough: from setup to PR creation in under 5 minutes*
63
+
64
+ ## πŸš€ Quick Start
65
+
66
+ ![KREW x Hugging Face Logo](images/demo.png)
67
+
68
+ ### Option 1: One-Click Demo (Recommended)
69
+ [![Open in Spaces](https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-md-dark.svg)](https://huggingface.co/spaces/YOUR_USERNAME/i18n-agent)
70
+
71
+ βœ… **No setup required!** Just click and start translating.
72
+ βœ… **Pre-requisites!** Need `Anthropic API key` and `Github token`.
73
+
74
+ ### Option 2: Run Locally
75
+
76
+ <details>
77
+ <summary>πŸ› οΈ Local Installation Guide</summary>
78
+
79
+ ```bash
80
+ # Clone the repo
81
+ git clone https://github.com/Hugging-Face-KREW/i18n-agent.git
82
+ cd i18n-agent
83
+
84
+ # Install dependencies
85
+ pip install -r requirements.txt
86
+
87
+ # Set up your keys
88
+ cp .env.example .env
89
+ # Add your Anthropic API key and GitHub token
90
+
91
+ # Launch the app
92
+ python app.py
93
+ ```
94
+
95
+ </details>
96
+
97
+ ## 🎯 How It Works
98
+
99
+ This agent specifically targets the [Hugging Face Transformers documentation](https://huggingface.co/docs/transformers/en/index) and submits PRs addressing [Issue #20179](https://github.com/huggingface/transformers/issues/20179) in the [huggingface/transformers](https://github.com/huggingface/transformers) repository.
100
+
101
+ ```mermaid
102
+ graph LR
103
+ A[πŸ” Find Files] --> B[πŸ€– Translate] --> C[πŸ“ Create PR]
104
+
105
+ A --> A1[Scan transformers docs]
106
+ A --> A2[Identify translation gaps]
107
+
108
+ B --> B1[Claude AI translation]
109
+ B --> B2[Preserve formatting]
110
+
111
+ C --> C1[Auto-branch creation]
112
+ C --> C2[Submit to huggingface/transformers]
113
+ ```
114
+
115
+ ### Step 1: πŸ” Discover Translation Targets
116
+ - Select your target language (Korean, and more languages will be supported)
117
+ - Set how many files to process
118
+ - Let AI identify the most impactful Transformers docs translations
119
+
120
+ ### Step 2: πŸ€– Smart Translation
121
+ - Enter your Anthropic API key
122
+ - Claude Sonnet 4 translates with context awareness
123
+ - Technical terms and code blocks preserved automatically
124
+
125
+ ### Step 3: πŸ“ Automated PR Creation
126
+ - Configure GitHub credentials
127
+ - System creates properly formatted pull requests for [huggingface/transformers](https://github.com/huggingface/transformers)
128
+ - Optional: Use reference PRs for consistency
129
+
130
+ ## 🌍 Supported Languages
131
+
132
+ <div align="center">
133
+
134
+ | Language | Code | Status |
135
+ |----------|------|--------|
136
+ | πŸ‡°πŸ‡· Korean | `ko` | βœ… Fully Supported |
137
+
138
+ *And more languages coming soon...*
139
+
140
+ </div>
141
+
142
+ ## πŸ—οΈ Architecture
143
+
144
+ <div align="center">
145
+ <a href="images/workflow.png" target="_blank">
146
+ <img src="images/workflow.png" alt="KREW x Hugging Face Logo" width="400">
147
+ </a>
148
+ </div>
149
+
150
+ <details>
151
+
152
+ <summary>πŸ“Š System Design Overview</summary>
153
+
154
+ **Frontend Layer**
155
+ - Gradio web interface with modern styling
156
+ - Real-time chat & quick controls with AI agent
157
+ - Progress tracking missing
158
+
159
+ **AI Processing Layer**
160
+ - File discovery with intelligent prioritization for Transformers docs
161
+ - Claude Sonnet 4 for context-aware translation
162
+ - LangChain integration for PR research
163
+
164
+ **Integration Layer**
165
+ - GitHub API for automated PR creation to [huggingface/transformers](https://github.com/huggingface/transformers)
166
+ - Branch management and commit structuring
167
+ - Template matching from reference PRs
168
+
169
+ </details>
170
+
171
+ ## βš™οΈ Configuration
172
+
173
+ ### For Spaces Deployment
174
+ Prepare these secrets:
175
+
176
+ ```bash
177
+ ANTHROPIC_API_KEY=your_claude_api_key
178
+ GITHUB_TOKEN=your_github_token
179
+ ```
180
+
181
+ ### For Local Development
182
+ Create `.env` file:
183
+
184
+ ```bash
185
+ ANTHROPIC_API_KEY=<your api key>
186
+
187
+ # GitHub PR Agent Configuration
188
+ GITHUB_TOKEN=<your github token>
189
+ GITHUB_OWNER=<your github username>
190
+ GITHUB_REPO=<your repository name>
191
+ REFERENCE_PR_URL=<reference pr url for style analysis>
192
+ ```
193
+
194
+ ## 🀝 Contributing
195
+
196
+ <div align="center">
197
+
198
+ **Love this project? Here's how you can help:**
199
+
200
+ [![Fork](https://img.shields.io/github/forks/username/repo?style=social)](https://github.com/Hugging-Face-KREW/i18n-agent.git)
201
+ [![Star](https://img.shields.io/github/stars/username/repo?style=social)](https://github.com/Hugging-Face-KREW/i18n-agent.git)
202
+ [![Issues](https://img.shields.io/github/issues/username/repo)](https://github.com/Hugging-Face-KREW/i18n-agent.git)
203
+
204
+ </div>
205
+
206
+ ### πŸ‘₯ Contributors
207
+
208
+ πŸ€— [email protected] / @harheem
209
+ πŸ€— [email protected] / @Jwaminju
210
+
211
+ ## πŸ’‘ Use Cases
212
+
213
+ > **🌟 Real-world scenarios where this agent shines:**
214
+
215
+ - **πŸ“š Documentation Teams**: Batch translate Transformers documentation updates
216
+ - **🌍 Community Contributors**: Help make Transformers accessible in your language
217
+ - **🏒 Organizations**: Streamline i18n workflows for Transformers library
218
+ - **πŸ‘¨β€πŸ’» Developers**: Contribute Transformers translations without manual GitHub workflow
219
+ - **🎯 Issue #20179 Contributors**: Directly address the internationalization challenges raised by the community
220
+
221
+ ## πŸ› οΈ Tech Stack
222
+
223
+ <div align="center">
224
+
225
+ ![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)
226
+ ![Gradio](https://img.shields.io/badge/gradio-FF6B35?style=for-the-badge&logo=gradio&logoColor=white)
227
+ ![Anthropic](https://img.shields.io/badge/Claude-191919?style=for-the-badge&logo=anthropic&logoColor=white)
228
+ ![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)
229
+ ![LangChain](https://img.shields.io/badge/LangChain-121212?style=for-the-badge&logo=chainlink&logoColor=white)
230
+
231
+ </div>
232
+
233
+ ## ❓ FAQ
234
+
235
+ <details>
236
+ <summary><strong>Q: How does this relate to Issue #20179?</strong></summary>
237
+ <br>
238
+ This agent directly addresses the pain points raised in <a href="https://github.com/huggingface/transformers/issues/20179">Issue #20179</a> by automating the translation workflow, reducing manual overhead, and making it easier for contributors to submit high-quality translations.
239
+ </details>
240
+
241
+ <details>
242
+ <summary><strong>Q: How accurate are the translations?</strong></summary>
243
+ <br>
244
+ 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.
245
+ </details>
246
+
247
+ <details>
248
+ <summary><strong>Q: What permissions do I need for GitHub integration?</strong></summary>
249
+ <br>
250
+ Your GitHub token needs repository read/write permissions and the ability to create branches and pull requests on the target repository.
251
+ </details>
252
+
253
+ <details>
254
+ <summary><strong>Q: Can I customize the translation style?</strong></summary>
255
+ <br>
256
+ Yes! You can provide reference PR URLs to match existing translation patterns and maintain consistency with community standards.
257
+ </details>
258
+
259
+ ## πŸ› Troubleshooting
260
+
261
+ ### Common Issues
262
+
263
+ <details>
264
+ <summary><strong>API Key Issues</strong></summary>
265
+
266
+ - Ensure your Anthropic API key is valid and has sufficient credits
267
+ - Check that your GitHub token has the necessary repository permissions
268
+
269
+ </details>
270
+
271
+ <details>
272
+ <summary><strong>Translation Quality</strong></summary>
273
+
274
+ - The system uses Claude Sonnet 4 for high-quality translations
275
+ - Formatting and markdown structure is maintained
276
+ - Please restart the translation again if you met format issue
277
+
278
+ </details>
279
+
280
+ <details>
281
+ <summary><strong>GitHub PR Creation</strong></summary>
282
+
283
+ - Verify repository permissions and branch protection rules
284
+ - Check that the reference PR URL is accessible and valid
285
+
286
+ </details>
287
+
288
+
289
+ ## πŸ™ Acknowledgments
290
+
291
+ Special thanks to the amazing communities that make this possible:
292
+
293
+ - **πŸ€— Hugging Face** - For building the Transformers library and comprehensive documentation
294
+ - **🎭 Anthropic** - For Claude's incredible language capabilities
295
+ - **πŸ‘₯ Hugging Face KREW Community** - For championing Korean AI translation
296
+ - **🎨 Gradio** - For making beautiful AI interfaces simple
297
+ - **🌍 Community Contributors** - For raising awareness through [Issue #20179](https://github.com/huggingface/transformers/issues/20179)
298
+
299
+ ---
300
+
301
+ <div align="center">
302
+
303
+ **Made with ❀️ for global accessibility of Hugging Face Transformers documentation.**
304
+
305
+ **🎯 Solving [Issue #20179](https://github.com/huggingface/transformers/issues/20179) one translation at a time.**
306
+
307
+ [⭐ Star this repo](https://github.com/Hugging-Face-KREW/i18n-agent.git) β€’ [πŸ› Report Bug](https://github.com/Hugging-Face-KREW/i18n-agent.git) β€’ [πŸ’‘ Request Feature](https://github.com/Hugging-Face-KREW/i18n-agent.git)
308
+
309
+ </div>