keess commited on
Commit
343abdc
1 Parent(s): 2b4b5f3

- add custom endpoint handler

Browse files
Files changed (1) hide show
  1. handler.py +4 -2
handler.py CHANGED
@@ -32,10 +32,12 @@ class EndpointHandler():
32
  """
33
  #print request
34
  print("request")
35
- print(data)
36
  # audio_data = read(io.BytesIO(data))
37
  # get inputs, inputs in request body is possible equal to wav or mp3 file
38
  inputs = data.pop("inputs", data)
39
-
 
40
  text = self.pipe(inputs)["text"]
 
41
  return text
 
32
  """
33
  #print request
34
  print("request")
35
+ print(data.inputs)
36
  # audio_data = read(io.BytesIO(data))
37
  # get inputs, inputs in request body is possible equal to wav or mp3 file
38
  inputs = data.pop("inputs", data)
39
+ print("here comes text")
40
+ print(self.pipe(inputs))
41
  text = self.pipe(inputs)["text"]
42
+ print(text)
43
  return text