Spaces:
Runtime error
Runtime error
import os | |
import sys | |
import subprocess | |
def update_repo(): | |
try: | |
subprocess.check_call(["git", "pull"]) | |
print("Repository updated successfully.") | |
except subprocess.CalledProcessError: | |
print("Failed to update repository.") | |
if __name__ == "__main__": | |
update_repo() | |
# Run the main script | |
main_script = os.path.join(os.path.dirname(__file__), "launch.py") | |
sys.exit(subprocess.call([sys.executable, main_script] + sys.argv[1:])) |