IDAgentsFreshTest / monitor_message_format.py
IDAgents Developer
Force authentication: Create hf_config.py and ensure auth always applies
cc8b97c
raw
history blame
3.22 kB
#!/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()