grootroot commited on
Commit
1e68553
·
1 Parent(s): b3116f1

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -14
app.py DELETED
@@ -1,14 +0,0 @@
1
- from transformers import pipeline, GPT2Tokenizer
2
-
3
- # Load the pre-trained GPT-2 model and tokenizer
4
- model = pipeline("text-generation", model="gpt2")
5
- tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
6
-
7
- # Generate an image from input text
8
- text = "A blue bird flying in the sky"
9
- input_ids = tokenizer.encode(text, return_tensors="pt")
10
- output = model.generate(input_ids=input_ids, max_length=1024, do_sample=True)
11
- image = generate_image_from_output(output)
12
-
13
- # Display the generated image
14
- image.show()