Downloads · 30 days
0
Tugfbk/stoc
stoc is a machine learning model from Tugfbk. 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
0
Access
Public
Updated Dec 3, 2023
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 55%
From the Hugging Face model README
import random
from transformers import AutoModelForPrompt, AutoTokenizer from PIL import Image
model = AutoModelForPrompt.from_pretrained("bigscience/bigsleep-14m") tokenizer = AutoTokenizer.from_pretrained("bigscience/bigsleep-14m")
names = ["Mike", "Eleven", "Dustin", "Lucas", "Will", "Joyce", "Jim", "Nancy", "Jonathan", "Steve", "Robin", "Erica", "Max", "Billy"]
traits = ["brave", "intelligent", "witty", "sarcastic", "determined", "loyal", "protective", "kind", "compassionate", "troubled", "mysterious", "powerful"]
locations = ["Hawkins National Laboratory", "Mirkwood Forest", "The Upside Down", "Starcourt Mall", "Hawkins Middle School", "Hawkins High School"]
prompt = f"A photorealistic portrait of a Stranger Things OC named {random.choice(names)} with {random.choice(traits)} eyes and {random.choice(traits)} hair. The OC is standing in {random.choice(locations)}."
#Generate the image image = model.generate_image(prompt)
#Save the image to a file image.save("oc.png")
#Display the image Image.open("oc.png").show()