voice_detection / check_file_upload.py
ranar110
Fix: Use absolute path for tester.html and add path debugging
f6d50b1
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.")