Downloads · 30 days
7
35% of all-time downloads
ANT1P4T1C4/generate_charade_prompt
generate_charade_prompt is a machine learning model from ANT1P4T1C4. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
7
35% of all-time downloads
All-time downloads
20
Public
Parameters
77M
1.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin308 MB · 50%
From the Hugging Face model README
Simple usage of the model:
from transformers import AutoModel, AutoTokenizer, T5ForConditionalGeneration
model_name = 'ANT1P4T1C4/generate_charade_prompt'
model = T5ForConditionalGeneration.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
def generate_word(difficulty):
input = tokenizer(difficulty, return_tensors="pt")
word = model.generate(input["input_ids"], max_length=10, do_sample=True)
return tokenizer.decode(word[0], skip_special_tokens=True)
print("easy: ", generate_word('easy prompt'))
print("medium: ", generate_word(('medium prompt')))
print("hard: ", generate_word("hard prompt"))