TextGeneration / README.md
FigoSans's picture
Update README.md
c777956 verified

Model Description

This model is used for text generation. if you want to use this model, try running the following code. Hope my model helps you.

Code

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "FigoSans/TextGeneration"
tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained(model_name)

input_text = "Input Text" inputs = tokenizer(input_text, return_tensors="pt") outputs = model.generate(**inputs) generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)

print(generated_text)