Spaces:
Sleeping
Sleeping
File size: 460 Bytes
022b7ae d9847a8 b892439 d9847a8 724eb2f d9847a8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import gradio as gr
from PIL import Image
import torch
model = torch.hub.load(
"AK391/animegan2-pytorch:main",
"generator",
pretrained=True)
face2paint = torch.hub.load(
'AK391/animegan2-pytorch:main', 'face2paint',trust_repo=True,size=512)
def inference(img):
out = face2paint(model, img)
return out
iface = gr.Interface(fn=inference, inputs=gr.Image(type="pil"), outputs=gr.Image(type="pil"),examples=['gongyoo.jpeg'])
iface.launch() |