Spitfire1970 commited on
Commit
5869c79
·
1 Parent(s): d25a262
Files changed (1) hide show
  1. handler.py +1 -0
handler.py CHANGED
@@ -13,6 +13,7 @@ class EndpointHandler():
13
  self.model.eval()
14
 
15
  def __call__(self, data):
 
16
  if data["length"] == 0:
17
  return {"reply": "hello from inference api!!"}
18
  tensor = torch.tensor(data["tensor"]).float().to(self.device)
 
13
  self.model.eval()
14
 
15
  def __call__(self, data):
16
+ data = data.get("inputs", data)
17
  if data["length"] == 0:
18
  return {"reply": "hello from inference api!!"}
19
  tensor = torch.tensor(data["tensor"]).float().to(self.device)