Spaces:
Running on Zero
Running on Zero
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -90,7 +90,9 @@ def _use_cuda():
|
|
| 90 |
return agent
|
| 91 |
|
| 92 |
|
| 93 |
-
|
|
|
|
|
|
|
| 94 |
def triage(message: str, threshold: float = 0.6):
|
| 95 |
"""Route a Persian support message to a department with calibrated probabilities.
|
| 96 |
|
|
|
|
| 90 |
return agent
|
| 91 |
|
| 92 |
|
| 93 |
+
# Measured on ZeroGPU: ~2.1 s on a cold worker (GPU attach + weight streaming), ~20 ms warm.
|
| 94 |
+
# 15 s covers the cold case with generous margin without wasting a visitor's quota.
|
| 95 |
+
@spaces.GPU(duration=15)
|
| 96 |
def triage(message: str, threshold: float = 0.6):
|
| 97 |
"""Route a Persian support message to a department with calibrated probabilities.
|
| 98 |
|