Spaces:
Runtime error
Runtime error
Commit ·
a42bfc7
1
Parent(s): 2e8c265
Premier déploiement - captionneur d'images CPU optimisé
Browse files
app.py
CHANGED
|
@@ -9,9 +9,9 @@ start = time.time()
|
|
| 9 |
# Modèle BLIP-base (990M paramètres) - bon compromis qualité/vitesse
|
| 10 |
# Alternative plus rapide : "nlpconnect/vit-gpt2-image-captioning"
|
| 11 |
captioner = pipeline(
|
| 12 |
-
"image-to-text",
|
| 13 |
model="Salesforce/blip-image-captioning-base",
|
| 14 |
-
device=-1
|
| 15 |
)
|
| 16 |
|
| 17 |
print(f"✅ Modèle chargé en {time.time() - start:.1f} secondes")
|
|
|
|
| 9 |
# Modèle BLIP-base (990M paramètres) - bon compromis qualité/vitesse
|
| 10 |
# Alternative plus rapide : "nlpconnect/vit-gpt2-image-captioning"
|
| 11 |
captioner = pipeline(
|
| 12 |
+
"image-text-to-text", # Changement ici : image-to-text → image-text-to-text
|
| 13 |
model="Salesforce/blip-image-captioning-base",
|
| 14 |
+
device=-1
|
| 15 |
)
|
| 16 |
|
| 17 |
print(f"✅ Modèle chargé en {time.time() - start:.1f} secondes")
|