kshama/qwen.py
2025-06-29 20:49:04 +06:00

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])