TruthLens commited on
Commit
3c5b169
·
verified ·
1 Parent(s): 048596b

Create test_api.py

Browse files
Files changed (1) hide show
  1. test_api.py +14 -0
test_api.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+
3
+ RENDER_API_URL = "https://saivahini.onrender.com/process_audio"
4
+
5
+ # ✅ Load a sample audio file (Make sure you upload `test.wav` in HF Spaces)
6
+ audio_file_path = "test.wav"
7
+
8
+ # ✅ Send a test request to Render API
9
+ with open(audio_file_path, "rb") as audio_file:
10
+ response = requests.post(RENDER_API_URL, files={"file": ("test.wav", audio_file, "audio/wav")})
11
+
12
+ # ✅ Print the response
13
+ print("Status Code:", response.status_code)
14
+ print("Response:", response.json())