Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -223,14 +223,9 @@ def run_fhe(user_id):
|
|
| 223 |
query["evaluation_key"] = encoded_evaluation_key
|
| 224 |
query["encrypted_encoding"] = encrypted_quantized_encoding
|
| 225 |
headers = {"Content-type": "application/json"}
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
)
|
| 230 |
-
else:
|
| 231 |
-
response = requests.post(
|
| 232 |
-
"http://localhost:8000/predict_sentiment", data=json.dumps(query), headers=headers
|
| 233 |
-
)
|
| 234 |
encrypted_prediction = base64.b64decode(response.json()["encrypted_prediction"])
|
| 235 |
|
| 236 |
# Save encrypted_prediction in a file, since too large to pass through regular Gradio
|
|
|
|
| 223 |
query["evaluation_key"] = encoded_evaluation_key
|
| 224 |
query["encrypted_encoding"] = encrypted_quantized_encoding
|
| 225 |
headers = {"Content-type": "application/json"}
|
| 226 |
+
response = requests.post(
|
| 227 |
+
"http://localhost:8000/predict_sentiment", data=json.dumps(query), headers=headers
|
| 228 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 229 |
encrypted_prediction = base64.b64decode(response.json()["encrypted_prediction"])
|
| 230 |
|
| 231 |
# Save encrypted_prediction in a file, since too large to pass through regular Gradio
|