Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
def image_generation(model, number_of_images=1):
|
| 5 |
+
Images = 0
|
| 6 |
+
return f"generating {number_of_images} images from {model}"
|
| 7 |
+
|
| 8 |
+
if __name__ == "__main__":
|
| 9 |
+
|
| 10 |
+
inputs = gr.inputs.Radio(["Abstract Expressionism", "Impressionism", "Cubism", "Minimalism", "Pop Art", "Color Field", "Hana Hanak houses"])
|
| 11 |
+
outputs = gr.outputs.Image(label="Output Image")
|
| 12 |
+
|
| 13 |
+
title = "Projected GAN for painting generation"
|
| 14 |
+
description = "choose your artistic direction "
|
| 15 |
+
article = "<p style='text-align: center'><a href='https://github.com/autonomousvision/projected_gan'>Official projected GAn github repo + paper</a> | <a href='https://github.com/facebookresearch/pytorch_GAN_zoo/blob/master/models/DCGAN.py'>Github Repo</a></p>"
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
gr.Interface(image_generation, inputs, outputs, title=title, article = article,
|
| 20 |
+
description=description, analytics_enabled=False).launch(debug=True)
|
| 21 |
+
|
| 22 |
+
app, local_url, share_url = iface.launch()
|
| 23 |
+
|
| 24 |
+
|