Spaces:
Sleeping
Sleeping
| """ | |
| Test de l'interface améliorée | |
| """ | |
| from mcp_server import analyze_herbicide_trends, predict_future_weed_pressure, recommend_sensitive_crop_plots, explore_raw_data | |
| def test_improved_functions(): | |
| """Test des fonctions améliorées""" | |
| print("🧪 Test de l'interface améliorée...") | |
| # Test 1: Analyse tendances | |
| print("\nTest 1: Analyse tendances") | |
| fig, summary = analyze_herbicide_trends(2020, 2024, "Toutes") | |
| if fig is not None: | |
| print("✅ Analyse tendances fonctionne") | |
| else: | |
| print("❌ Erreur:", summary) | |
| # Test 2: Prédictions | |
| print("\nTest 2: Prédictions") | |
| fig, summary = predict_future_weed_pressure() | |
| if fig is not None: | |
| print("✅ Prédictions fonctionnent") | |
| else: | |
| print("❌ Erreur:", summary) | |
| # Test 3: Recommandations | |
| print("\nTest 3: Recommandations") | |
| fig, summary = recommend_sensitive_crop_plots() | |
| if fig is not None: | |
| print("✅ Recommandations fonctionnent") | |
| else: | |
| print("❌ Erreur:", summary) | |
| # Test 4: Exploration données | |
| print("\nTest 4: Exploration données") | |
| fig, summary = explore_raw_data(2020, 2024, "Toutes", "Toutes", "Toutes") | |
| if fig is not None: | |
| print("✅ Exploration données fonctionne") | |
| else: | |
| print("❌ Erreur:", summary) | |
| if __name__ == "__main__": | |
| test_improved_functions() | |