shadowfh96 commited on
Commit
45a90dc
·
verified ·
1 Parent(s): 3be2f90

Delete wrapper.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. wrapper.py +0 -28
wrapper.py DELETED
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Python wrapper for HuggingFace Spaces deployment.
4
- Starts backend services (PG, Redis, sub2api) and keeps running.
5
- This makes the Dockerfile look like a normal Python app to HF's detection.
6
- """
7
- import subprocess
8
- import sys
9
- import time
10
-
11
- def main():
12
- print("=== Python wrapper starting backend services ===")
13
-
14
- # Start supervisord which manages PG, Redis, and sub2api
15
- proc = subprocess.Popen(
16
- ["supervisord", "-c", "/etc/supervisord.conf"],
17
- stdout=sys.stdout,
18
- stderr=sys.stderr,
19
- )
20
-
21
- print(f"Supervisord started with PID {proc.pid}")
22
- print("Backend services are starting... sub2api will be available on port 7860")
23
-
24
- # Wait for supervisord to exit (it runs forever in nodaemon mode)
25
- proc.wait()
26
-
27
- if __name__ == "__main__":
28
- main()