Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
|
3 |
+
# Load a pre-trained model
|
4 |
+
generator = pipeline('image-generation', model='huggingface/gan-model')
|
5 |
+
|
6 |
+
# Generate an image
|
7 |
+
generated_image = generator("A futuristic city")
|
8 |
+
generated_image[0]['image'].show() # Show the generated image
|