sAIvahini / app.py
TruthLens's picture
Rename test_api.py to app.py
6abcac3 verified
raw
history blame
496 Bytes
import requests
RENDER_API_URL = "https://saivahini.onrender.com/process_audio"
# βœ… Load a sample audio file (Make sure you upload `test.wav` in HF Spaces)
audio_file_path = "user_input.wav"
# βœ… Send a test request to Render API
with open(audio_file_path, "rb") as audio_file:
response = requests.post(RENDER_API_URL, files={"file": ("user_input.wav", audio_file, "audio/wav")})
# βœ… Print the response
print("Status Code:", response.status_code)
print("Response:", response.json())