Spaces:
Sleeping
Sleeping
| """ | |
| Simple health check script for debugging deployment issues | |
| """ | |
| import sys | |
| import os | |
| def main(): | |
| print("π₯ Health Check for Agentic Browser") | |
| print("=" * 40) | |
| # Check Python version | |
| print(f"Python Version: {sys.version}") | |
| # Check current directory | |
| print(f"Current Directory: {os.getcwd()}") | |
| # Check if key files exist | |
| key_files = [ | |
| "app.py", | |
| "requirements.txt", | |
| "src/streamlit_app.py", | |
| "src/models/model_manager.py" | |
| ] | |
| print("\nπ File Check:") | |
| for file in key_files: | |
| exists = "β " if os.path.exists(file) else "β" | |
| print(f"{exists} {file}") | |
| # Check imports | |
| print("\nπ¦ Import Check:") | |
| try: | |
| import streamlit | |
| print(f"β Streamlit {streamlit.__version__}") | |
| except ImportError as e: | |
| print(f"β Streamlit: {e}") | |
| try: | |
| import torch | |
| print(f"β PyTorch {torch.__version__}") | |
| except ImportError as e: | |
| print(f"β PyTorch: {e}") | |
| try: | |
| import transformers | |
| print(f"β Transformers {transformers.__version__}") | |
| except ImportError as e: | |
| print(f"β Transformers: {e}") | |
| # Test app import | |
| print("\nπ§ App Import Test:") | |
| try: | |
| sys.path.insert(0, '.') | |
| sys.path.insert(0, 'src') | |
| import app | |
| print("β app.py imports successfully") | |
| except Exception as e: | |
| print(f"β app.py import failed: {e}") | |
| print("\nβ Health check complete!") | |
| if __name__ == "__main__": | |
| main() |