Spaces:
Sleeping
Sleeping
Commit ·
c19c852
1
Parent(s): 8a61b15
Fix: Update Gradio 6.x API endpoint configuration
Browse files26 unmodified lines2728293031323319 unmodified lines535455565758596026 unmodified linesexcept Exception as e:return json.dumps({"success": False, "error": str(e)})# ✅ Interface Gradio - gr.Interface est plus fiable pour l'APIiface = gr.Interface(fn=recommend_outfit_api,inputs=[19 unmodified lines"Tunis"]],# ✅ Pour Gradio 6.x, l'endpoint standard est /run/predict (pas besoin d'api_name)# L'API est automatiquement exposée via /run/predict)# ✅ Lancement de l'interface26 unmodified lines2728293031323319 unmodified lines53545556575859606126 unmodified linesexcept Exception as e:return json.dumps({"success": False, "error": str(e)})# ✅ Interface Gradio - gr.Interface avec api_name explicite pour Gradio 6.xiface = gr.Interface(fn=recommend_outfit_api,inputs=[19 unmodified lines"Tunis"]],# ✅ CRUCIAL : api_name est nécessaire pour Gradio 6.x# Cela expose l'endpoint /api/predictapi_name="predict")# ✅ Lancement de l'interface
app.py+4-3