Spaces:
Sleeping
Sleeping
| """ | |
| Test final de l'application sans mcp_server | |
| """ | |
| from mcp_server import create_mcp_interface | |
| def test_final_app(): | |
| """Test final de l'application""" | |
| print("🧪 Test final de l'application...") | |
| try: | |
| demo = create_mcp_interface() | |
| print("✅ Interface créée avec succès") | |
| # Test des fonctions principales | |
| from mcp_server import analyze_herbicide_trends, predict_future_weed_pressure, recommend_sensitive_crop_plots, explore_raw_data | |
| # Test rapide des fonctions | |
| print("📈 Test analyse tendances...") | |
| fig, summary = analyze_herbicide_trends(2020, 2024, "Toutes") | |
| if fig is not None: | |
| print("✅ Analyse tendances OK") | |
| print("🔮 Test prédictions...") | |
| fig, summary = predict_future_weed_pressure() | |
| if fig is not None: | |
| print("✅ Prédictions OK") | |
| print("🌱 Test recommandations...") | |
| fig, summary = recommend_sensitive_crop_plots() | |
| if fig is not None: | |
| print("✅ Recommandations OK") | |
| print("📊 Test exploration données...") | |
| fig, summary = explore_raw_data(2020, 2024, "Toutes", "Toutes", "Toutes") | |
| if fig is not None: | |
| print("✅ Exploration données OK") | |
| print("\n🎯 Application prête pour le déploiement !") | |
| print("📋 Toutes les fonctionnalités sont opérationnelles") | |
| print("🔧 Resources MCP disponibles en tant que fonctions Python") | |
| return True | |
| except Exception as e: | |
| print(f"❌ Erreur: {e}") | |
| import traceback | |
| traceback.print_exc() | |
| return False | |
| if __name__ == "__main__": | |
| test_final_app() | |