Spaces:
Build error
Build error
File size: 1,029 Bytes
7883666 13c4eaf 7883666 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import gradio as gr
from huggingface_hub import PyTorchModelHubMixin
import torch
import matplotlib.pyplot as plt
import torchvision
from networks_fastgan import MyGenerator
import click
import PIL
from image_generator import generate_images
def image_generation(model, number_of_images=1):
img = generate_images(model)
#return f"generating {number_of_images} images from {model}"
return img
if __name__ == "__main__":
description = ""
inputs = gr.inputs.Radio([ "Impressionism", "Abstract Expressionism", "Cubism", "Pop Art", "Color Field", "Hana Hanak houses", "Hana Hanak houses - abstract expressionism", "Hana Hanak houses - color field"])
outputs = gr.outputs.Image(label="Generated Image", type="pil")
#outputs = "text"
title = "Projected GAN for painting generation v0.2"
gr.Interface(image_generation, inputs, outputs, title=title, article = article, description = description,
analytics_enabled=False).launch(debug=True)
app, local_url, share_url = iface.launch()
|