GavinHuang commited on
Commit
d7d7874
·
1 Parent(s): f334b99

fix: declare model as global in transcribe function for proper access

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -24,6 +24,7 @@ def transcribe(audio, state=""):
24
  if audio is None:
25
  return state, state
26
 
 
27
  # Move model to GPU if available
28
  if torch.cuda.is_available():
29
  print(f"CUDA device: {torch.cuda.get_device_name(0)}")
 
24
  if audio is None:
25
  return state, state
26
 
27
+ global model
28
  # Move model to GPU if available
29
  if torch.cuda.is_available():
30
  print(f"CUDA device: {torch.cuda.get_device_name(0)}")