File size: 438 Bytes
1c38647
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from transformers import pipeline

# After training, the model is available at:
MODEL_ID = "ligaments-dev/gemma-2b-telecom-sft"

pipe = pipeline("text-generation", model=MODEL_ID, device_map="auto")

messages = [
    {"role": "user", "content": "My internet has been down for two hours. Can you help me troubleshoot?"}
]

response = pipe(messages, max_new_tokens=256, do_sample=True, temperature=0.7)
print(response[0]["generated_text"])