suneeln-duke commited on
Commit
06a9ba3
1 Parent(s): a3afef0

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +4 -2
handler.py CHANGED
@@ -1,6 +1,6 @@
1
  from typing import Any, Dict, List
2
 
3
- import torch
4
 
5
  import transformers
6
 
@@ -36,7 +36,9 @@ class EndpointHandler:
36
 
37
 
38
  def __call__(self, data: Dict[dict, Any]) -> Dict[str, Any]:
39
- question = data.pop("question", data)
 
 
40
 
41
  context = data.pop("context", None)
42
 
 
1
  from typing import Any, Dict, List
2
 
3
+ import torch, re
4
 
5
  import transformers
6
 
 
36
 
37
 
38
  def __call__(self, data: Dict[dict, Any]) -> Dict[str, Any]:
39
+ inputs = data.pop("inputs", data)
40
+
41
+ question = data.pop("question", None)
42
 
43
  context = data.pop("context", None)
44