Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,13 +11,16 @@ print("⚠️ Démarrage du chargement du modèle Marqo-FashionSigLIP... (cela p
|
|
| 11 |
# 🎯 MODEL NAME CHANGE ICI - C'EST LE NOUVEAU MODELE
|
| 12 |
model_name = print("⚠️ Démarrage du chargement du modèle...")
|
| 13 |
# 🎯 MODELE PUBLIC ET TESTE qui fonctionne toujours
|
| 14 |
-
model_name = "
|
| 15 |
# On utilise un pipeline standard de classification d'images, plus simple
|
|
|
|
| 16 |
from transformers import pipeline
|
| 17 |
-
pipe = pipeline("image-classification", model=model_name, framework="pt")
|
| 18 |
-
print("✅ Modèle chargé avec succès !")
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
# Middleware pour autoriser les appels depuis votre application Lovable
|
| 23 |
app.add_middleware(
|
|
|
|
| 11 |
# 🎯 MODEL NAME CHANGE ICI - C'EST LE NOUVEAU MODELE
|
| 12 |
model_name = print("⚠️ Démarrage du chargement du modèle...")
|
| 13 |
# 🎯 MODELE PUBLIC ET TESTE qui fonctionne toujours
|
| 14 |
+
model_name = "Marqo/marqo-fashionCLIP"
|
| 15 |
# On utilise un pipeline standard de classification d'images, plus simple
|
| 16 |
+
# Use a pipeline as a high-level helper
|
| 17 |
from transformers import pipeline
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
pipe = pipeline("zero-shot-image-classification", model="Marqo/marqo-fashionCLIP", trust_remote_code=True)
|
| 20 |
+
pipe(
|
| 21 |
+
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png",
|
| 22 |
+
candidate_labels=["animals", "humans", "landscape"],
|
| 23 |
+
)
|
| 24 |
|
| 25 |
# Middleware pour autoriser les appels depuis votre application Lovable
|
| 26 |
app.add_middleware(
|