Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -133,7 +133,8 @@ def encrypt_encoded_quantize(encodings):
|
|
| 133 |
fhe_api = FHEModelClient(f"fhe_model", f".fhe_keys/{eval_key}")
|
| 134 |
fhe_api.load()
|
| 135 |
|
| 136 |
-
|
|
|
|
| 137 |
quantized_encodings = fhe_api.model.quantize_input(encodings).astype(numpy.uint8)
|
| 138 |
encrypted_quantized_encoding = fhe_api.quantize_encrypt_serialize(encodings)
|
| 139 |
|
|
|
|
| 133 |
fhe_api = FHEModelClient(f"fhe_model", f".fhe_keys/{eval_key}")
|
| 134 |
fhe_api.load()
|
| 135 |
|
| 136 |
+
data = json.loads(encodings)
|
| 137 |
+
encodings = np.array(data).reshape(1, -1)
|
| 138 |
quantized_encodings = fhe_api.model.quantize_input(encodings).astype(numpy.uint8)
|
| 139 |
encrypted_quantized_encoding = fhe_api.quantize_encrypt_serialize(encodings)
|
| 140 |
|