diff --git a/myproject/myapp/views.py b/myproject/myapp/views.py
index b90b29a1e030d1559ec66b614a9ebbb4cbe8ae02..91bd421ec4cad01f3663cfde0919698244e9b23c 100644
--- a/myproject/myapp/views.py
+++ b/myproject/myapp/views.py
@@ -227,11 +227,11 @@ class InstrumentDetectionView(APIView):
             audio_file = serializer.validated_data['audio_file']
             
             # Save the uploaded file temporarily
-            with open('temp_audio.wav', 'wb') as f:
-                f.write(audio_file.read())
+            # with open('temp_audio.wav', 'wb') as f:
+            #     f.write(audio_file.read())
             
             # Preprocess the audio file
-            preprocessed_data = preprocess_audio_for_inference('temp_audio.wav')
+            preprocessed_data = preprocess_audio_for_inference(audio_file)
             
             # Prepare data for TensorFlow Serving
             data = json.dumps({"signature_name": "serving_default", "instances": [window.tolist() for window in preprocessed_data]})
diff --git a/myproject/temp_audio.wav b/myproject/temp_audio.wav
deleted file mode 100644
index b47a440af0d73187525a2566509da3183762a8e5..0000000000000000000000000000000000000000
Binary files a/myproject/temp_audio.wav and /dev/null differ