Spaces:
Sleeping
Sleeping
Download app.py from Xenobd/Biitnet.cpp-servers0-mini: direct link, hf CLI and curl.
- Browser
- Download file 400 Bytes
-
https://huggingface.co/spaces/Xenobd/Biitnet.cpp-servers0-mini/resolve/main/app.py
- Command line
-
hf download hf://spaces/Xenobd/Biitnet.cpp-servers0-mini/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Xenobd/Biitnet.cpp-servers0-mini/resolve/main/app.py
400 Bytes
| import subprocess | |
| import os | |
| # Prepare the command | |
| command = [ | |
| "python", | |
| "run_inference_server.py", | |
| "-m", "./models/ggml-model-i2_s.gguf", | |
| "--host", "0.0.0.0", | |
| "--port", "7860" | |
| ] | |
| # Run it as a subprocess | |
| try: | |
| subprocess.run("ls",check=True) | |
| subprocess.run(command, check=True) | |
| except subprocess.CalledProcessError as e: | |
| print(f"Error running inference server: {e}") |