aTrapDeer commited on
Commit
4c99bf4
·
verified ·
1 Parent(s): 22e008a

Bootstrap Audio Flamingo 3 custom endpoint repo

Browse files
Files changed (1) hide show
  1. handler.py +2 -0
handler.py CHANGED
@@ -251,6 +251,7 @@ class EndpointHandler:
251
  tokenize=True,
252
  add_generation_prompt=True,
253
  return_dict=True,
 
254
  audio_kwargs={"sampling_rate": int(sample_rate)},
255
  )
256
  except Exception:
@@ -259,6 +260,7 @@ class EndpointHandler:
259
  tokenize=True,
260
  add_generation_prompt=True,
261
  return_dict=True,
 
262
  )
263
 
264
  def __call__(self, data: Dict[str, Any]) -> Dict[str, Any]:
 
251
  tokenize=True,
252
  add_generation_prompt=True,
253
  return_dict=True,
254
+ return_tensors="pt",
255
  audio_kwargs={"sampling_rate": int(sample_rate)},
256
  )
257
  except Exception:
 
260
  tokenize=True,
261
  add_generation_prompt=True,
262
  return_dict=True,
263
+ return_tensors="pt",
264
  )
265
 
266
  def __call__(self, data: Dict[str, Any]) -> Dict[str, Any]: