vitorcalvi commited on
Commit
459fd87
·
1 Parent(s): 0b37dcb
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -9,6 +9,10 @@ import warnings
9
 
10
  warnings.filterwarnings("ignore", category=UserWarning, module='librosa')
11
 
 
 
 
 
12
  app = FastAPI()
13
 
14
  def extract_audio_features(audio_file_path):
@@ -101,4 +105,4 @@ async def analyze_stress(
101
  if __name__ == "__main__":
102
  import uvicorn
103
  port = int(os.getenv("PORT", 7860)) # Use the PORT environment variable for Render compatibility
104
- uvicorn.run("main:app", host="0.0.0.0", port=port, reload=True)
 
9
 
10
  warnings.filterwarnings("ignore", category=UserWarning, module='librosa')
11
 
12
+ # Disable librosa cache to avoid caching issues
13
+ librosa.cache.clear()
14
+ librosa.util.cache.disable()
15
+
16
  app = FastAPI()
17
 
18
  def extract_audio_features(audio_file_path):
 
105
  if __name__ == "__main__":
106
  import uvicorn
107
  port = int(os.getenv("PORT", 7860)) # Use the PORT environment variable for Render compatibility
108
+ uvicorn.run("app:app", host="0.0.0.0", port=port, reload=True)