9 lines
261 B
Python
9 lines
261 B
Python
# Use a pipeline as a high-level helper
|
|
from transformers import pipeline
|
|
|
|
pipe = pipeline("text-generation", model="Qwen/Qwen3-0.6B")
|
|
messages = [
|
|
{"role": "user", "content": "Who are you?"},
|
|
]
|
|
output = pipe(messages)
|
|
print(output[0]["generated_text"][-1]) |