Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -107,7 +107,7 @@ def encode_quantize_encrypt(text, user_id):
|
|
| 107 |
raise gr.Error("You need to generate FHE keys first.")
|
| 108 |
if "legal_rating" in model_names:
|
| 109 |
fhe_api = FHEModelClient(FHE_LEGAL_PATH, f".fhe_keys/{user_id}")
|
| 110 |
-
encodings =vectorizer.fit_transform([text])
|
| 111 |
else:
|
| 112 |
fhe_api = FHEModelClient(FHE_MODEL_PATH, f".fhe_keys/{user_id}")
|
| 113 |
encodings = transformer_vectorizer.transform([text])
|
|
|
|
| 107 |
raise gr.Error("You need to generate FHE keys first.")
|
| 108 |
if "legal_rating" in model_names:
|
| 109 |
fhe_api = FHEModelClient(FHE_LEGAL_PATH, f".fhe_keys/{user_id}")
|
| 110 |
+
encodings =vectorizer.fit_transform([text]).toarray()
|
| 111 |
else:
|
| 112 |
fhe_api = FHEModelClient(FHE_MODEL_PATH, f".fhe_keys/{user_id}")
|
| 113 |
encodings = transformer_vectorizer.transform([text])
|