mariotawfik commited on
Commit
c6147ee
·
1 Parent(s): 8e95300
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -129,7 +129,8 @@ def encode_quantize(test_file, eval_key, encodings):
129
  return encodings
130
 
131
  def encrypt_encoded_quantize(encodings):
132
-
 
133
  quantized_encodings = fhe_api.model.quantize_input(encodings).astype(numpy.uint8)
134
  encrypted_quantized_encoding = fhe_api.quantize_encrypt_serialize(encodings)
135
 
 
129
  return encodings
130
 
131
  def encrypt_encoded_quantize(encodings):
132
+ fhe_api = FHEModelClient(f"fhe_model", f".fhe_keys/{eval_key}")
133
+ fhe_api.load()
134
  quantized_encodings = fhe_api.model.quantize_input(encodings).astype(numpy.uint8)
135
  encrypted_quantized_encoding = fhe_api.quantize_encrypt_serialize(encodings)
136