import gradio as gr import os import sys from huggingface_hub import scan_cache_dir os.system("mkdir hotshotxl") os.system("cd hotshotxl") #os.system("mkdir -p datasets/DeepFashion") #os.system("mkdir -p output/DeepFashion/ckpt/pretrained") os.system("git clone https://github.com/hotshotco/Hotshot-XL.git") os.system("cd Hotshot-XL") sys.path.append("Hotshot-XL") os.system("pip install -r requirements.txt") import inference as inf def infer(inp): #hf_cache_info = scan_cache_dir() #output = inf("a cat running through a field") return scan_cache_dir() with gr.Blocks() as app: prompt = gr.Textbox() gif_out = gr.JSON() btn = gr.Button() btn.click(infer,prompt,gif_out) app.launch()