import os os.system("pip install gradio==2.4.6") import gradio as gr os.system("pip install 'git+https://github.com/facebookresearch/detectron2.git'") os.system("git clone https://github.com/hful/bizarre-pose-estimator.git") os.chdir("bizarre-pose-estimator") os.system("wget https://i.imgur.com/IkJzlaE.jpeg") os.system("gdown https://drive.google.com/uc?id=1qhnBmMdDTC_8kmNj4u2f_Htfvg6KuE14") os.system("unzip bizarre_pose_models.zip") os.system("cp -a ./bizarre_pose_models/. .") os.system("ls") 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 = "bizarre-pose-estimator" description = "Gradio demo for Transfer Learning for Pose Estimation of Illustrated Characters. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below." article = "

Transfer Learning for Pose Estimation of Illustrated Characters | Github Repo

" examples=[["IkJzlaE.jpeg"]] gr.Interface( inference, gr.inputs.Image(type="filepath", label="Input"), gr.outputs.Image(type="file", label="Output"), title=title, description=description, article=article, allow_flagging="never", examples=examples, enable_queue=True ).launch()