Update README
Browse files
README.md
CHANGED
@@ -50,7 +50,14 @@ tags:
|
|
50 |
|
51 |
from transformers import pipeline
|
52 |
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
# Load model directly
|
56 |
|
|
|
50 |
|
51 |
from transformers import pipeline
|
52 |
|
53 |
+
# Initialize the translation pipeline
|
54 |
+
translator = pipeline("translation", model="Bildad/Swahili-English_Translation")
|
55 |
+
|
56 |
+
# Translate text
|
57 |
+
translation = translator("Habari yako?")[0]
|
58 |
+
translated_text = translation["translation_text"]
|
59 |
+
|
60 |
+
print(translated_text)
|
61 |
|
62 |
# Load model directly
|
63 |
|