File size: 412 Bytes
7800c33
 
 
 
 
 
ba5a35c
abd286b
8e5414e
 
ba5a35c
 
 
 
 
 
 
7800c33
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from handler import EndpointHandler

# init handler
my_handler = EndpointHandler(path=".")

# prepare sample payload
example = {
 "inputs": [
   {"id": "1", "speaker": "Alice", "text": "How much is the fish?" },
   {"id": "2", "speaker": "Bob", "text": "I have no idea, ask Alice" }
 ],
 "parameters": {
   "speaker_1_min_num_words": 5,
   "speaker_2": "Bob"
 }
}


# test the handler
print(my_handler(example))