Spaces:
Sleeping
Sleeping
| #!/usr/bin/env python3 | |
| """ | |
| Monitor deployment after message format fixes | |
| """ | |
| import time | |
| import requests | |
| def monitor_message_format_fix(): | |
| """Monitor the deployment after fixing message format""" | |
| print("π§ MONITORING AFTER MESSAGE FORMAT FIXES") | |
| print("=" * 60) | |
| url = "https://huggingface.co/spaces/John-jero/IDAgentsFreshTest" | |
| for attempt in range(6): | |
| try: | |
| print(f"\nβ±οΈ Check #{attempt + 1} at {time.strftime('%H:%M:%S')}") | |
| response = requests.get(url, timeout=20) | |
| print(f"Status: {response.status_code}") | |
| print(f"Size: {len(response.text):,} bytes") | |
| # Check for success indicators | |
| text = response.text.lower() | |
| if response.status_code == 200: | |
| print("β Status 200: Excellent!") | |
| # Look for specific success indicators | |
| if "infectious diseases agent builder" in text: | |
| print("π ID AGENTS SUCCESSFULLY DEPLOYED!") | |
| print("π Your application is now running!") | |
| break | |
| elif "get started" in text: | |
| print("π― Landing page detected - app is working!") | |
| break | |
| elif "gradio" in text and "agent" in text: | |
| print("π€ Agent interface detected - deployment successful!") | |
| break | |
| elif "error" in text: | |
| print("β οΈ Error detected in response") | |
| # Check for specific error patterns | |
| if "expected a list" in text or "list of lists" in text: | |
| print("π Message format error may still exist") | |
| else: | |
| print("π± App responding - likely successful!") | |
| elif response.status_code == 401: | |
| print("π Status 401: Still building/authenticating") | |
| elif response.status_code == 502: | |
| print("π§ Status 502: Server restarting") | |
| else: | |
| print(f"β Status: {response.status_code}") | |
| # Show preview | |
| preview = response.text[:400].replace('\n', ' ') | |
| print(f"Preview: {preview[:150]}...") | |
| if attempt < 5: | |
| print("β³ Waiting 25 seconds...") | |
| time.sleep(25) | |
| except Exception as e: | |
| print(f"β Request failed: {e}") | |
| if attempt < 5: | |
| time.sleep(25) | |
| print(f"\nπ― FINAL STATUS:") | |
| print(f"Visit: {url}") | |
| print("\nπ What to look for:") | |
| print("β’ Landing page with 'Infectious Diseases Agent Builder'") | |
| print("β’ 'Get Started' button") | |
| print("β’ No Gradio format errors") | |
| print("β’ Functional simple chatbot") | |
| print("\nπ If successful:") | |
| print("β’ Add API keys (OPENAI_API_KEY, SERPER_API_KEY)") | |
| print("β’ Test full agent builder functionality") | |
| print("β’ Verify agent creation and chat features") | |
| if __name__ == "__main__": | |
| monitor_message_format_fix() | |