Translation
Transformers
ONNX
Nepali
English
setu_translation
feature-extraction
nepali
english
multilingual
code-mixed
romanized
devanagari
custom_code
Eval Results (legacy)
Instructions to use santoshdahal/setu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use santoshdahal/setu with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("translation", model="santoshdahal/setu", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("santoshdahal/setu", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -67,17 +67,18 @@ model = AutoModel.from_pretrained("santoshdahal/setu", trust_remote_code=True)
|
|
| 67 |
# Translate text
|
| 68 |
result = model("mero ghar kathmandu ma cha")
|
| 69 |
print("Translation:", result)
|
| 70 |
-
# Output: "
|
| 71 |
|
| 72 |
# Works with Devanagari script too
|
| 73 |
-
result = model("
|
| 74 |
print("Translation:", result)
|
| 75 |
-
# Output: "
|
| 76 |
|
| 77 |
# Handles informal text
|
| 78 |
-
result = model("
|
| 79 |
print("Translation:", result)
|
| 80 |
-
# Output: "
|
|
|
|
| 81 |
```
|
| 82 |
|
| 83 |
## Model Details
|
|
|
|
| 67 |
# Translate text
|
| 68 |
result = model("mero ghar kathmandu ma cha")
|
| 69 |
print("Translation:", result)
|
| 70 |
+
# Output: "my home in kathmandu"
|
| 71 |
|
| 72 |
# Works with Devanagari script too
|
| 73 |
+
result = model("mero name ram poudel ho")
|
| 74 |
print("Translation:", result)
|
| 75 |
+
# Output: "my name is ram poudel"
|
| 76 |
|
| 77 |
# Handles informal text
|
| 78 |
+
result = model("where is your home?")
|
| 79 |
print("Translation:", result)
|
| 80 |
+
# Output: "where's your home?"
|
| 81 |
+
|
| 82 |
```
|
| 83 |
|
| 84 |
## Model Details
|