Ahsen Khaliq
Update app.py
9b671f0
raw
history blame
1.09 kB
import gradio as gr
import os
os.system("git clone https://github.com/ShuhongChen/bizarre-pose-estimator.git")
oschdir("bizarre-pose-estimator")
os.system("gdown https://drive.google.com/uc?id=1qhnBmMdDTC_8kmNj4u2f_Htfvg6KuE14")
os.system("unzip -j bizarre_pose_models.zip")
def inference(img):
os.system("python3 -m _scripts.pose_estimator "+img+" ./_train/character_pose_estim/runs/feat_concat+data.ckpt")
return "./_samples/character_pose_estim.png"
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="Input"),
gr.outputs.Image(type="file", label="Output"),
title=title,
description=description,
article=article
).launch(debug=True)