# -*- coding: utf-8 -*- # Copyright @ 2023 wdcqc/aieud project. # Open-source under license obtainable in project root (LICENSE.md). import argparse import os import urllib.request def fix_file(path): # I think this is because I did the setup.py wrong, but pip install git+repo works in colab so idk how to really fix target_path = "/home/user/.local/lib/python3.8/site-packages/wfd/{}".format(path) if not os.path.exists(target_path): try: os.makedirs("/home/user/.local/lib/python3.8/site-packages/wfd/{}".format(os.path.dirname(path))) except Exception as e: print(e) try: urllib.request.urlretrieve( "https://github.com/wdcqc/WaveFunctionDiffusion/raw/remaster/wfd/{}".format(path), target_path ) except Exception as e: print(e) if __name__ == "__main__": fix_file("mpqapi/libstorm.so") fix_file("webui/templates/tempura.css") fix_file("webui/templates/background.css") fix_file("webui/doki_settings.json") from wfd.webui import start_demo class Arguments: colab = False link_to_colab = True args = Arguments() start_demo(args)