Spaces:
Runtime error
Runtime error
Download app.py from cocktailpeanut/Artist: direct link, hf CLI and curl.
- Browser
- Download file 556 Bytes
-
https://huggingface.co/spaces/cocktailpeanut/Artist/resolve/main/app.py
- Command line
-
hf download hf://spaces/cocktailpeanut/Artist/app.py
-
curl -L -o app.py https://huggingface.co/spaces/cocktailpeanut/Artist/resolve/main/app.py
556 Bytes
| import os | |
| import sys | |
| import subprocess | |
| # Get the current path of this script | |
| current_path = os.path.abspath(__file__) | |
| print('current_path', current_path) | |
| # Get the parent directory of the current script | |
| parent_path = os.path.dirname(current_path) | |
| print('parent_path', parent_path) | |
| # Append the parent directory to the system path | |
| sys.path.append(parent_path) | |
| print('sys.path', sys.path) | |
| # Form the command with the required arguments | |
| command = [ | |
| 'python', 'injection_main_HF.py', | |
| '--mode', 'app' | |
| ] | |
| # Execute the command | |
| subprocess.run(command) |