import requests import time print("Waiting for Hugging Face Space to rebuild with File Upload support...") print("=" * 70) base_url = "https://ranar118-voice-detection.hf.space" for attempt in range(1, 8): print(f"\nAttempt {attempt}/7 (checking every 20 seconds)...") try: response = requests.get(f"{base_url}/", timeout=15) if response.status_code == 200: # Check for specific elements that indicate the new version has_file_input = 'id="audioFile"' in response.text has_tabs = 'class="tab' in response.text has_tab_switcher = 'switchTab' in response.text print(f" Status: {response.status_code} OK") print(f" Has File Input: {has_file_input}") print(f" Has Tab Interface: {has_tabs}") if has_file_input and has_tabs and has_tab_switcher: print("\n" + "=" * 70) print("āœ… SUCCESS! The major update is live!") print("=" * 70) print("\n✨ New Features Confirmed:") print(" 1. šŸ“‚ File Upload Support - Upload local MP3/WAV files") print(" 2. šŸŽ›ļø Tab Interface - Switch between URL and File upload") print(" 3. šŸŽµ Consolidated Audio Players - Preview before testing") print(" 4. šŸ”§ Network Fixes - All consolidated") print("\n🌐 Visit: https://ranar118-voice-detection.hf.space/") break else: print(" ā³ Still showing old version, rebuild in progress...") else: print(f" Status: {response.status_code}") except Exception as e: print(f" āš ļø Error: {str(e)[:100]}") if attempt < 7: time.sleep(20) else: print("\nā³ Rebuild is taking longer than expected") print("Please wait a few more minutes.")