CoolFace
Apppublic

TruthLens/sAIvahini

sourceHugging Facemitupdated 2y agoView on Hugging Face
0likes
app.py22 linesDownload Raw Back to root
1import requests2import streamlit as st3 4# โœ… Render API URL5RENDER_API_URL = "https://saivahini.onrender.com/process_audio"6 7st.title("Test API from HF Spaces ๐Ÿš€")8 9# โœ… Load a sample test audio file (Make sure `test.wav` exists in HF Spaces)10test_audio_file = "test.wav"11 12try:13    with open(test_audio_file, "rb") as audio_file:14        response = requests.post(RENDER_API_URL, files={"file": ("test.wav", audio_file, "audio/wav")})15 16    # โœ… Show API response17    st.write("Status Code:", response.status_code)18    st.write("Response:", response.text)19 20except Exception as e:21    st.error(f"โŒ API Test Failed: {e}")22