Spaces:
Runtime error
Runtime error
Update app.py
Browse files67 unmodified lines6869707172737475763 unmodified lines8081828384858615 unmodified lines10210310410510610710867 unmodified linesstylized_image = tensor_to_image(stylized_image)content_image_input = tensor_to_image(content_image_input)stylized_image = stylized_image.resize(content_image_input.size)if super_resolution_type is "none":return stylized_imageelse:stylized_image = inference(stylized_image, super_resolution_type)return stylized_image3 unmodified lineswith gr.Row():style_reference_input_gallery = gr.Gallery(list(style_urls.values()),#width = 512,height = 768 + 32,label = "Style Image gallery (click to use)")with gr.Column():super_resolution_type = gr.Radio(["none" ,"base", "anime"], type="value", default="none", label="model used to super resolution the Image Transformed")15 unmodified linesimage_click, style_reference_input_gallery, style_reference_input_image)trans_button.click(perform_neural_transfer, [content_image_input, style_reference_input_image], trans_image_output)gr.Examples([67 unmodified lines6869707172737475767778798081823 unmodified lines8687888990919215 unmodified lines10810911011111211311467 unmodified linesstylized_image = tensor_to_image(stylized_image)content_image_input = tensor_to_image(content_image_input)stylized_image = stylized_image.resize(content_image_input.size)print("super_resolution_type :")print(super_resolution_type)#print(super_resolution_type.value)if super_resolution_type is "none":return stylized_imageelse:print("call else :")stylized_image = inference(stylized_image, super_resolution_type)return stylized_image3 unmodified lineswith gr.Row():style_reference_input_gallery = gr.Gallery(list(style_urls.values()),#width = 512,height = 768 + 256,label = "Style Image gallery (click to use)")with gr.Column():super_resolution_type = gr.Radio(["none" ,"base", "anime"], type="value", default="none", label="model used to super resolution the Image Transformed")15 unmodified linesimage_click, style_reference_input_gallery, style_reference_input_image)trans_button.click(perform_neural_transfer, [content_image_input, style_reference_input_image, super_resolution_type], trans_image_output)gr.Examples([
app.py+8-2