Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -54,7 +54,7 @@ REGIONS = {
|
|
| 54 |
|
| 55 |
|
| 56 |
# ---- GPU Prediction ----
|
| 57 |
-
@spaces.GPU(duration=
|
| 58 |
def _predict(text):
|
| 59 |
m = ensure_model()
|
| 60 |
tok = m["tokenizer"]
|
|
@@ -188,7 +188,7 @@ def _insight(s):
|
|
| 188 |
|
| 189 |
|
| 190 |
# ---- Handlers ----
|
| 191 |
-
@spaces.GPU(duration=
|
| 192 |
def _transcribe_and_score(video_path):
|
| 193 |
"""Extract audio, transcribe with Whisper, then score with Phi-2."""
|
| 194 |
import subprocess
|
|
|
|
| 54 |
|
| 55 |
|
| 56 |
# ---- GPU Prediction ----
|
| 57 |
+
@spaces.GPU(duration=30)
|
| 58 |
def _predict(text):
|
| 59 |
m = ensure_model()
|
| 60 |
tok = m["tokenizer"]
|
|
|
|
| 188 |
|
| 189 |
|
| 190 |
# ---- Handlers ----
|
| 191 |
+
@spaces.GPU(duration=60)
|
| 192 |
def _transcribe_and_score(video_path):
|
| 193 |
"""Extract audio, transcribe with Whisper, then score with Phi-2."""
|
| 194 |
import subprocess
|