sAIvahini / test_api.py
TruthLens's picture
Create test_api.py
3c5b169 verified
raw
history blame
484 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 = "test.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": ("test.wav", audio_file, "audio/wav")})
# βœ… Print the response
print("Status Code:", response.status_code)
print("Response:", response.json())