samwell commited on
Commit
40a81ed
·
verified ·
1 Parent(s): 72bafd6

Clean handler

Browse files
Files changed (1) hide show
  1. handler.py +0 -19
handler.py CHANGED
@@ -1,22 +1,3 @@
1
- # Run install script FIRST before any other imports
2
- import subprocess
3
- import sys
4
- import os
5
-
6
- # Install cosmos-guardrail with --no-deps to avoid version conflicts
7
- subprocess.run([
8
- sys.executable, "-m", "pip", "install",
9
- "cosmos-guardrail", "--no-deps", "-q"
10
- ], check=False)
11
-
12
- # Install its runtime dependencies with flexible versions
13
- subprocess.run([
14
- sys.executable, "-m", "pip", "install",
15
- "better-profanity", "nltk", "opencv-python-headless",
16
- "retinaface-py", "scikit-image", "imageio", "-q"
17
- ], check=False)
18
-
19
- # NOW import the rest
20
  import torch
21
  import base64
22
  import io
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import torch
2
  import base64
3
  import io