Spaces:
Runtime error
Runtime error
import gradio as gr | |
import os | |
import yaml | |
import huggingface_hub | |
huggingface_hub.hf_hub_download( | |
repo_id='yzd-v/DWPose', | |
filename='yolox_l.onnx', | |
local_dir='./models/DWPose', | |
local_dir_use_symlinks=False, | |
) | |
huggingface_hub.hf_hub_download( | |
repo_id='yzd-v/DWPose', | |
filename='dw-ll_ucoco_384.onnx', | |
local_dir='./models/DWPose', | |
local_dir_use_symlinks=False, | |
) | |
huggingface_hub.hf_hub_download( | |
repo_id='ixaac/MimicMotion', | |
filename='MimicMotion_1-1.pth', | |
local_dir='./models', | |
local_dir_use_symlinks=False, | |
) | |
def print_directory_contents(path): | |
for root, dirs, files in os.walk(path): | |
level = root.replace(path, '').count(os.sep) | |
indent = ' ' * 4 * (level) | |
print(f"{indent}{os.path.basename(root)}/") | |
subindent = ' ' * 4 * (level + 1) | |
for f in files: | |
print(f"{subindent}{f}") | |
# Path to the directory you want to print | |
directory_path = './models' | |
# Print the directory contents | |
print_directory_contents(directory_path) | |
def infer(text): | |
return text | |
demo = gr.Interface( | |
fn = infer, | |
inputs = [gr.Textbox()], | |
outputs = [gr.Textbox()] | |
) | |
demo.launch() |