Xenobd commited on
Commit
4068605
·
verified ·
1 Parent(s): e7c6cb7

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import subprocess
2
+ import os
3
+
4
+
5
+
6
+ # Prepare the command
7
+ command = [
8
+ "python",
9
+ "run_inference_server.py",
10
+ "-m", "./models/ggml-model-i2_s.gguf",
11
+ "--host", "0.0.0.0",
12
+ "--port", "7860"
13
+ ]
14
+
15
+ # Run it as a subprocess
16
+ try:
17
+ subprocess.run("ls",check=True)
18
+ subprocess.run(command, check=True)
19
+ except subprocess.CalledProcessError as e:
20
+ print(f"Error running inference server: {e}")