File size: 625 Bytes
3c5b169 950fbff 3c5b169 950fbff 3c5b169 950fbff 3c5b169 950fbff 3c5b169 950fbff |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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}")
|