import requests import streamlit as st # ✅ Render API URL RENDER_API_URL = "https://saivahini.onrender.com/process_audio" st.title("Test API from HF Spaces 🚀") # ✅ Load a sample test audio file (Make sure `test.wav` exists in HF Spaces) test_audio_file = "test.wav" try: with open(test_audio_file, "rb") as audio_file: response = requests.post(RENDER_API_URL, files={"file": ("test.wav", audio_file, "audio/wav")}) # ✅ Show API response st.write("Status Code:", response.status_code) st.write("Response:", response.text) except Exception as e: st.error(f"❌ API Test Failed: {e}")