Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ from transformers import (
|
|
| 18 |
AutoModelForCausalLM,
|
| 19 |
AutoTokenizer
|
| 20 |
)
|
| 21 |
-
from moviepy
|
| 22 |
|
| 23 |
# --- Configuration ---
|
| 24 |
CATEGORIES = ['affection', 'angry', 'back_off', 'defensive', 'feed_me', 'happy', 'hunt', 'in_heat', 'mother_call', 'pain', 'wants_attention']
|
|
@@ -134,7 +134,7 @@ def analyze_cat_v12_final(video_path):
|
|
| 134 |
clip.close()
|
| 135 |
t_audio = time.time() - t_0
|
| 136 |
|
| 137 |
-
# --- B. VISION (Processor chargé à chaque appel
|
| 138 |
t_1 = time.time()
|
| 139 |
vlm_proc = AutoProcessor.from_pretrained("HuggingFaceTB/SmolVLM2-256M-Video-Instruct")
|
| 140 |
|
|
|
|
| 18 |
AutoModelForCausalLM,
|
| 19 |
AutoTokenizer
|
| 20 |
)
|
| 21 |
+
from moviepy import VideoFileClip # ← Changement principal : import direct depuis moviepy (v2.x)
|
| 22 |
|
| 23 |
# --- Configuration ---
|
| 24 |
CATEGORIES = ['affection', 'angry', 'back_off', 'defensive', 'feed_me', 'happy', 'hunt', 'in_heat', 'mother_call', 'pain', 'wants_attention']
|
|
|
|
| 134 |
clip.close()
|
| 135 |
t_audio = time.time() - t_0
|
| 136 |
|
| 137 |
+
# --- B. VISION (Processor chargé à chaque appel) ---
|
| 138 |
t_1 = time.time()
|
| 139 |
vlm_proc = AutoProcessor.from_pretrained("HuggingFaceTB/SmolVLM2-256M-Video-Instruct")
|
| 140 |
|