Spaces:
Sleeping
Sleeping
| #!/usr/bin/env python3 | |
| """ | |
| Monitor Original ID Agents App Deployment | |
| Check if the full agent builder system is working | |
| """ | |
| import requests | |
| import time | |
| from datetime import datetime | |
| def monitor_original_app(): | |
| """Monitor the original ID Agents app deployment""" | |
| print("π MONITORING ORIGINAL ID AGENTS APP") | |
| print("=" * 60) | |
| print(f"URL: https://huggingface.co/spaces/John-jero/IDAgentsFreshTest") | |
| print(f"Time: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}") | |
| print("Checking if your original agent builder app is working...") | |
| print("-" * 60) | |
| for check in range(3): | |
| print(f"\nπ Check {check + 1}/3:") | |
| try: | |
| response = requests.get( | |
| "https://huggingface.co/spaces/John-jero/IDAgentsFreshTest", | |
| timeout=15 | |
| ) | |
| print(f"β Status Code: {response.status_code}") | |
| print(f"β Response Size: {len(response.text)} bytes") | |
| # Check for specific indicators of your original app | |
| text = response.text.lower() | |
| # Look for signs of the original agent builder | |
| if "agent builder" in text or "create custom" in text: | |
| print("π SUCCESS: Original ID Agents app is working!") | |
| print("β Agent builder interface detected") | |
| break | |
| elif "id agents" in text and ("medical" in text or "ai" in text): | |
| print("π± PARTIAL: ID Agents interface detected") | |
| print("π May still be loading agent builder features") | |
| elif "building" in text or "preparing" in text: | |
| print("π BUILDING: Space is still building") | |
| elif "error" in text or "failed" in text: | |
| print("β ERROR: App showing error page") | |
| print("π‘ May need to check logs or simplify deployment") | |
| else: | |
| print("β UNKNOWN: Checking for specific content...") | |
| # Look for more specific signs | |
| if "gradio" in text: | |
| print("π± Gradio interface detected") | |
| if "openai" in text or "api" in text: | |
| print("π API integration references found") | |
| if "consultation" in text or "medical" in text: | |
| print("π©Ί Medical functionality detected") | |
| except requests.exceptions.Timeout: | |
| print("β±οΈ TIMEOUT: Space taking longer than 15 seconds to respond") | |
| except Exception as e: | |
| print(f"β ERROR: {e}") | |
| if check < 2: # Don't wait after last check | |
| print("β³ Waiting 60 seconds before next check...") | |
| time.sleep(60) | |
| print(f"\nπ― NEXT STEPS:") | |
| print("1. Visit the URL manually to see the interface") | |
| print("2. Check if you see the agent builder tabs/sections") | |
| print("3. Look for any error messages in the interface") | |
| print("4. If errors, we may need to simplify the deployment further") | |
| print("5. Add API keys once the interface is stable") | |
| print(f"\nπ TROUBLESHOOTING IF NEEDED:") | |
| print("β’ If still showing errors β simplify complex imports") | |
| print("β’ If agent builder missing β check core modules loaded") | |
| print("β’ If interface broken β revert to simpler UI") | |
| print("β’ If API errors β add OpenAI key in Space secrets") | |
| if __name__ == "__main__": | |
| monitor_original_app() | |