Модель ruT5-base была fine-tuned для задачи question answer, предназначенная для Russian текст.
Uses
from transformers import AutoTokenizer, T5ForConditionalGeneration
qa_checkpoint = 'r1char9/ruT5_q_a'
qa_model = T5ForConditionalGeneration.from_pretrained(qa_checkpoint)
qa_tokenizer = AutoTokenizer.from_pretrained(qa_checkpoint)
prompt='Нарисуй изображение Томаса Шелби'
def question_answering(prompt):
question = "Что нужно нарисовать?"
tokenized_sentence = qa_tokenizer(prompt, question, return_tensors='pt')
res = qa_model.generate(**tokenized_sentence)
decoded_res = qa_tokenizer.decode(res[0], skip_special_tokens=True)
return decoded_res
prompt = question_answering(prompt)
# 'изображение Томаса Шелби'
- Downloads last month
- 168
Inference Providers
NEW
This model is not currently available via any of the supported third-party Inference Providers, and
the model is not deployed on the HF Inference API.