Spaces:
Running
Running
Update app.py
Browse files7 unmodified lines89101112131415161718192021227 unmodified linesos.environ["no_proxy"] = "localhost, 127.0.0.1, ::1"# Download modelsimport subprocessshell_script = './tools/dlmodels.sh'try:subprocess.run(shell_script, shell=True, check=True)print("Shell script executed successfully.")except subprocess.CalledProcessError as e:print(f"Error running shell script: {e}")except FileNotFoundError:print(f"Shell script not found: {shell_script}")except Exception as e:print(f"An error occurred: {e}")7 unmodified lines891011121314151617181920217 unmodified linesos.environ["no_proxy"] = "localhost, 127.0.0.1, ::1"# Download modelsshell_script = './tools/dlmodels.sh'try:return_code = os.system(shell_script)if return_code == 0:print("Shell script executed successfully.")else:print(f"Shell script failed with return code {return_code}")except Exception as e:print(f"An error occurred: {e}")
app.py+6-7