Spaces:
Runtime error
Runtime error
Commit
·
c6147ee
1
Parent(s):
8e95300
load
Browse files
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 |
|