File size: 1,060 Bytes
2543307
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ffda472
2543307
 
 
 
 
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
import os
import gradio as gr

os.system("git clone https://github.com/AK391/PAMA.git")

os.chdir("PAMA")

os.system("gdown https://drive.google.com/uc?id=1rPB_qnelVVSad6CtadmhRFi0PMI_RKdy")
os.mkdir("checkpoints")

os.system("unzip -j original_PAMA.zip -d checkpoints/")

def inference(content,style):
  os.system("python main.py eval --content "+content+" --style "+style)
  return "ics.jpg"
  
title = "Anime2Sketch"
description = "demo for Anime2Sketch. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2104.05703'>Adversarial Open Domain Adaption for Sketch-to-Photo Synthesis</a> | <a href='https://github.com/Mukosame/Anime2Sketch'>Github Repo</a></p>"

gr.Interface(
    inference, 
    [gr.inputs.Image(type="filepath", label="Content"),gr.inputs.Image(type="filepath", label="Style")], 
    gr.outputs.Image(type="file", label="Output"),
    title=title,
    description=description,
    article=article,
 ).launch()