binoua commited on
Commit
57da008
1 Parent(s): 6c3e823

Upload handler.py

Browse files
Files changed (1) hide show
  1. handler.py +6 -10
handler.py CHANGED
@@ -18,17 +18,13 @@ class EndpointHandler:
18
  A :obj:`list` | `dict`: will be serialized and returned
19
  """
20
 
21
- if False:
22
- # Get inputs
23
- encrypted_inputs = data.pop("encrypted_inputs", data)
24
 
25
- # Get keys
26
- evaluation_keys = data.pop("evaluation_keys", data)
27
 
28
- # Run CML prediction
29
- encrypted_prediction = self.fhemodel_server.run(encrypted_inputs, evaluation_keys)
30
-
31
- else:
32
- return 42
33
 
34
  return encrypted_prediction
 
18
  A :obj:`list` | `dict`: will be serialized and returned
19
  """
20
 
21
+ # Get inputs
22
+ encrypted_inputs = data.pop("encrypted_inputs", data)
 
23
 
24
+ # Get keys
25
+ evaluation_keys = data.pop("evaluation_keys", data)
26
 
27
+ # Run CML prediction
28
+ encrypted_prediction = self.fhemodel_server.run(encrypted_inputs, evaluation_keys)
 
 
 
29
 
30
  return encrypted_prediction