Spaces:
Sleeping
Sleeping
WenqingZhang
commited on
Commit
•
f32e899
1
Parent(s):
2264eb8
Update server.py
Browse files
server.py
CHANGED
@@ -34,7 +34,8 @@ def predict_sentiment(query: PredictRequest):
|
|
34 |
# Encode base64 the prediction
|
35 |
encoded_prediction = base64.b64encode(prediction).decode()
|
36 |
return {"encrypted_prediction": encoded_prediction}
|
37 |
-
|
|
|
38 |
@app.post("/predict_legal")
|
39 |
def predict_legal(query: PredictRequest):
|
40 |
fhe_legal_model = FHEModelServer("deployment/legal_rating")
|
@@ -46,3 +47,4 @@ def predict_legal(query: PredictRequest):
|
|
46 |
# Encode base64 the prediction
|
47 |
encoded_prediction = base64.b64encode(prediction).decode()
|
48 |
return {"encrypted_prediction": encoded_prediction}
|
|
|
|
34 |
# Encode base64 the prediction
|
35 |
encoded_prediction = base64.b64encode(prediction).decode()
|
36 |
return {"encrypted_prediction": encoded_prediction}
|
37 |
+
'''
|
38 |
+
|
39 |
@app.post("/predict_legal")
|
40 |
def predict_legal(query: PredictRequest):
|
41 |
fhe_legal_model = FHEModelServer("deployment/legal_rating")
|
|
|
47 |
# Encode base64 the prediction
|
48 |
encoded_prediction = base64.b64encode(prediction).decode()
|
49 |
return {"encrypted_prediction": encoded_prediction}
|
50 |
+
'''
|