Update app.py
Browse files
app.py
CHANGED
|
@@ -96,6 +96,7 @@ def encode_quantize_encrypt(text, user_id):
|
|
| 96 |
fhe_api = FHEModelClient(FHE_MODEL_PATH, f".fhe_keys/{user_id}")
|
| 97 |
fhe_api.load()
|
| 98 |
encodings = transformer_vectorizer.transform([text])
|
|
|
|
| 99 |
quantized_encodings = fhe_api.model.quantize_input(encodings).astype(numpy.uint8)
|
| 100 |
encrypted_quantized_encoding = fhe_api.quantize_encrypt_serialize(encodings)
|
| 101 |
|
|
|
|
| 96 |
fhe_api = FHEModelClient(FHE_MODEL_PATH, f".fhe_keys/{user_id}")
|
| 97 |
fhe_api.load()
|
| 98 |
encodings = transformer_vectorizer.transform([text])
|
| 99 |
+
print(encodings.shape)
|
| 100 |
quantized_encodings = fhe_api.model.quantize_input(encodings).astype(numpy.uint8)
|
| 101 |
encrypted_quantized_encoding = fhe_api.quantize_encrypt_serialize(encodings)
|
| 102 |
|