WenqingZhang commited on
Commit
3eb2259
·
verified ·
1 Parent(s): aff01b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
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
- if "legal_rating" in model_names:
227
- response = requests.post(
228
- "http://localhost:8000/predict_legal", data=json.dumps(query), headers=headers
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