Downloads · 30 days
14
22% of all-time downloads
zibaatak/book-buddy-question-generator
book-buddy-question-generator is a text generation model from zibaatak. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This fine-tuned model was generated to help students study. By submitting their texts, the model will generate a question to help them study.
Downloads · 30 days
14
22% of all-time downloads
All-time downloads
64
Public
Repo size
484 MB
Likes
0
Public
Click a slice to open those files.
.bin484 MB · 99%
From the Hugging Face model README
This fine-tuned model was generated to help students study. By submitting their texts, the model will generate a question to help them study.
Provide instructions on how to use your model in a clear and concise manner.
# Example code for using the model
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained("t5_tokenizer")
# Load the model
model = AutoModelForSeq2SeqLM.from_pretrained("t5_trained_model")
# Generate a question
input_text = "Provide a sample input text."
input_ids = tokenizer.encode(input_text, return_tensors="pt", padding=True, max_length=512, truncation=True)
# Generate question
question_ids = model.generate(input_ids, max_length=32, num_return_sequences=1, num_beams=4)
# Decode the generated question
generated_question = tokenizer.decode(question_ids[0], skip_special_tokens=True)
print(f"Generated Question: {generated_question}")