ericjedha commited on
Commit
1df5807
·
verified ·
1 Parent(s): bf64010

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,7 +18,7 @@ from transformers import (
18
  AutoModelForCausalLM,
19
  AutoTokenizer
20
  )
21
- from moviepy.editor import VideoFileClip # Correction : import correct
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 pour éviter les fuites mémoire) ---
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