abrahammg commited on
Commit
1d5405d
1 Parent(s): 70205df

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -0
README.md CHANGED
@@ -31,3 +31,19 @@ To use this model, follow the example code provided below. Ensure you have the n
31
 
32
  ```bash
33
  pip install transformers
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  ```bash
33
  pip install transformers
34
+
35
+ ### Example code
36
+
37
+ ```bash
38
+ from transformers import AutoModelForCausalLM, AutoTokenizer
39
+
40
+ model_name = "abrahammg/Llama3-8B-Galician-Chat"
41
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
42
+ model = AutoModelForCausalLM.from_pretrained(model_name)
43
+
44
+ text = "Enter some text in Galician here."
45
+ inputs = tokenizer(text, return_tensors="pt")
46
+ outputs = model.generate(**inputs)
47
+
48
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
49
+