#!/usr/bin/env python3 """ Monitor deployment after Chatbot type fix """ import time import requests def monitor_after_chatbot_fix(): """Monitor the deployment after fixing Chatbot type parameter""" print("šŸ”§ MONITORING AFTER CHATBOT TYPE PARAMETER FIX") print("=" * 60) url = "https://huggingface.co/spaces/John-jero/IDAgentsFreshTest" for attempt in range(6): # Check a few more times since we fixed two major issues 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: Great!") # Look for app interface indicators if "agent builder" in text: print("šŸŽ‰ AGENT BUILDER DETECTED!") print("šŸš€ Your ID Agents app is now running!") break elif "gradio" in text: print("šŸ“± Gradio detected - app interface loading...") elif "infectious diseases" in text: print("🦠 ID content detected - app is working!") break elif "error" in text: print("āš ļø Error still detected in response") elif "building" in text or "preparing" in text: print("šŸ”„ Still building...") else: print("šŸ“± Response received, likely working!") elif response.status_code == 401: print("šŸ” Status 401: Authentication page (still building)") else: print(f"āŒ Unexpected status: {response.status_code}") # Show first 300 chars for context preview = response.text[:300].replace('\n', ' ') print(f"Preview: {preview}...") 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šŸ” Look for:") print("• Agent Builder interface with tabs") print("• Landing page with 'Get Started' button") print("• No Gradio error messages") print("\nšŸ”‘ If working, next step:") print("• Add API keys in HF Space settings:") print(" - OPENAI_API_KEY") print(" - SERPER_API_KEY") print("• Restart the Space") print("• Test agent creation and chat functionality") if __name__ == "__main__": monitor_after_chatbot_fix()