Safetensors
EarthSpeciesProject
NatureLM
Cheeky Sparrow commited on
Commit
8172885
·
1 Parent(s): 5a6ef06

update handler

Browse files
Files changed (1) hide show
  1. handler.py +4 -4
handler.py CHANGED
@@ -24,14 +24,14 @@ class EndpointHandler():
24
 
25
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
26
  """
27
- Process audio numpy arrays with NatureLM-audio model.
28
 
29
  Parameters
30
  ----------
31
  data : Dict[str, Any]
32
  Dictionary containing:
33
- - audio : list[float]
34
- Audio data as numpy array
35
  - query : str
36
  Question to ask about the audio
37
  - sample_rate : int, optional
@@ -44,7 +44,7 @@ class EndpointHandler():
44
  or error dictionary with 'error' key
45
  """
46
 
47
- audio = data.get("audio")
48
  query = data.get("query", "")
49
  sample_rate = data.get("sample_rate", 16000)
50
 
 
24
 
25
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
26
  """
27
+ Process audio list of floats with NatureLM-audio model.
28
 
29
  Parameters
30
  ----------
31
  data : Dict[str, Any]
32
  Dictionary containing:
33
+ - inputs : list[float]
34
+ Audio data as list of floats
35
  - query : str
36
  Question to ask about the audio
37
  - sample_rate : int, optional
 
44
  or error dictionary with 'error' key
45
  """
46
 
47
+ audio = data.get("inputs")
48
  query = data.get("query", "")
49
  sample_rate = data.get("sample_rate", 16000)
50