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