Spaces:
Sleeping
Sleeping
File size: 464 Bytes
c7b46d4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from sklearn import pipeline
from transformers import AutoProcessor, AutoModelForImageTextToText
def get_chat_transformers(messages: list):
model = AutoModelForImageTextToText.from_pretrained("Xkev/Llama-3.2V-11B-cot")
pipe = pipeline("text-generation",
model=model,
device_map="auto",)
pipe = pipeline("text-generation", model="meta-llama/Llama-3.1-8B-Instruct")
outputs = pipe(messages)
return outputs[0]["generated_text"][-1]
|