Spaces:
Paused
Paused
Download debug_black_screen.py from AUXteam/UserSyncInterface: direct link, hf CLI and curl.
- Browser
- Download file 989 Bytes
-
https://huggingface.co/spaces/AUXteam/UserSyncInterface/resolve/main/debug_black_screen.py
- Command line
-
hf download hf://spaces/AUXteam/UserSyncInterface/debug_black_screen.py
-
curl -L -o debug_black_screen.py https://huggingface.co/spaces/AUXteam/UserSyncInterface/resolve/main/debug_black_screen.py
989 Bytes
| from playwright.sync_api import sync_playwright | |
| import time | |
| def verify(): | |
| with sync_playwright() as p: | |
| browser = p.chromium.launch(headless=True) | |
| context = browser.new_context(viewport={'width': 1280, 'height': 720}) | |
| page = context.new_page() | |
| page.on('console', lambda msg: print(f'BROWSER LOG: {msg.text}')) | |
| page.on('pageerror', lambda err: print(f'BROWSER ERROR: {err}')) | |
| print("Navigating to HF Space...") | |
| page.goto('https://auxteam-usersyncinterface.hf.space') | |
| print("Wait 1s") | |
| time.sleep(1) | |
| page.screenshot(path='/home/jules/verification/black_1s.png') | |
| print("Wait 3s") | |
| time.sleep(3) | |
| page.screenshot(path='/home/jules/verification/black_4s.png') | |
| print("Wait 5s") | |
| time.sleep(5) | |
| page.screenshot(path='/home/jules/verification/black_9s.png') | |
| browser.close() | |
| if __name__ == "__main__": | |
| verify() | |