Spaces:
Sleeping
Sleeping
test without exec
Browse files
server.py
CHANGED
@@ -100,17 +100,18 @@ def run_fhe(user_id: str = Form()):
|
|
100 |
|
101 |
# Run the FHE execution
|
102 |
start = time.time()
|
103 |
-
try:
|
104 |
-
|
105 |
-
except MemoryError:
|
106 |
-
|
107 |
-
|
108 |
-
except Exception as e:
|
109 |
-
|
110 |
-
|
111 |
-
finally:
|
112 |
-
|
113 |
-
|
|
|
114 |
|
115 |
fhe_execution_time = round(time.time() - start, 2)
|
116 |
|
|
|
100 |
|
101 |
# Run the FHE execution
|
102 |
start = time.time()
|
103 |
+
# try:
|
104 |
+
# encrypted_output = FHE_SERVER.run(encrypted_image, evaluation_key)
|
105 |
+
# except MemoryError:
|
106 |
+
# logger.error("FHE execution failed due to insufficient memory")
|
107 |
+
# raise HTTPException(status_code=503, detail="Insufficient memory during FHE execution")
|
108 |
+
# except Exception as e:
|
109 |
+
# logger.error(f"FHE execution failed: {str(e)}")
|
110 |
+
# raise HTTPException(status_code=500, detail="FHE execution failed")
|
111 |
+
# finally:
|
112 |
+
# # Force garbage collection after FHE execution
|
113 |
+
# gc.collect()
|
114 |
+
encrypted_output = encrypted_image
|
115 |
|
116 |
fhe_execution_time = round(time.time() - start, 2)
|
117 |
|