Bildad commited on
Commit
1826ef3
1 Parent(s): 87b68a8

Update README

Browse files
Files changed (1) hide show
  1. README.md +8 -1
README.md CHANGED
@@ -50,7 +50,14 @@ tags:
50
 
51
  from transformers import pipeline
52
 
53
- pipe = pipeline("text2text-generation", model="Bildad/Swahili-English_Translation")
 
 
 
 
 
 
 
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