badrex commited on
Commit
7732609
·
verified ·
1 Parent(s): 17f8795

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ print("Model moved to GPU successfully")
14
 
15
 
16
  @spaces.GPU
17
- def generate(audio_segment, sr=16000):
18
  return classifier({"sampling_rate": sr, "raw": audio_segment})
19
 
20
 
@@ -49,7 +49,7 @@ def predict_dialect(audio):
49
  print(f"Processing audio: sample rate={sr}, shape={audio_array.shape}")
50
 
51
  # Classify the dialect
52
- predictions = classifier({"sampling_rate": sr, "raw": audio_array})
53
 
54
  # Format results for display
55
  results = {}
 
14
 
15
 
16
  @spaces.GPU
17
+ def predict(audio_segment, sr=16000):
18
  return classifier({"sampling_rate": sr, "raw": audio_segment})
19
 
20
 
 
49
  print(f"Processing audio: sample rate={sr}, shape={audio_array.shape}")
50
 
51
  # Classify the dialect
52
+ predictions = predict(sr=sr, audio_segment=audio_array)
53
 
54
  # Format results for display
55
  results = {}