import gradio as gr VALID_CHOICES = [ "Bald", "Young", "Mustache", "Eyeglasses", "Hat", "Smiling", "Gray_Hair", ] ENABLE_GPU = False MODEL_NAME = "stylegan_ffhq" OUTPUT_LIST = [ gr.outputs.Image(type="pil", label="Generated Images"), gr.outputs.Image(type="pil", label="Modified Images"), ] # description = """ # This is an interactive demo of an extension of the CVPR2020 InterfaceGAN paper, by adding other attributes such as Hat, Bald, etc. to the generated images. Here is a step-by-step guide to use this interface: # + 🌾 Select the Random seed you want to use to generate the images # + 🗂 Select the list of attributes you want to modify (of course, you can mix several attributes) # + 🛠Select the coefficient of modification (higher value means stronger modification) # + 🔥 Submit! # Check the original repo as well as the extended version of the work. # ⭕ This method is biased on the data it has been trained for attribute recognition. E.g. if you decide to modify the "Bald" attribute on Female faces, the method will turn it into Male faces. Future work may focus more on this direction to try to have unbiased results of the modifications. #Check the original repo as well as the extended version of the work. # # #
# """ description = """This is an interactive demo of an extension of the CVPR2020 InterfaceGAN paper, which adds other attributes such as Hat, Bald, etc. to the generated images. Here is a step-by-step guide to use this space: