Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files
server.py
CHANGED
|
@@ -9,7 +9,7 @@ import uvicorn
|
|
| 9 |
|
| 10 |
|
| 11 |
current_dir = Path(__file__).parent
|
| 12 |
-
|
| 13 |
|
| 14 |
# Initialize an instance of FastAPI
|
| 15 |
app = FastAPI()
|
|
@@ -23,14 +23,16 @@ def root():
|
|
| 23 |
"""
|
| 24 |
return {"message": "Welcome to your disease prediction with FHE!"}
|
| 25 |
|
|
|
|
|
|
|
| 26 |
|
|
|
|
| 27 |
# Load the model
|
| 28 |
fhe_model = FHEModelServer(
|
| 29 |
Path.joinpath(current_dir, "fhe_model")
|
| 30 |
)
|
| 31 |
-
print(Path.joinpath(current_dir, "fhe_model"))
|
| 32 |
print(fhe_model)
|
| 33 |
-
|
| 34 |
class PredictRequest(BaseModel):
|
| 35 |
evaluation_key: str
|
| 36 |
encrypted_encoding: str
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
current_dir = Path(__file__).parent
|
| 12 |
+
|
| 13 |
|
| 14 |
# Initialize an instance of FastAPI
|
| 15 |
app = FastAPI()
|
|
|
|
| 23 |
"""
|
| 24 |
return {"message": "Welcome to your disease prediction with FHE!"}
|
| 25 |
|
| 26 |
+
print(Path.joinpath(current_dir, "fhe_model"))
|
| 27 |
+
from glob import glob
|
| 28 |
|
| 29 |
+
print(glob(f'{current_dir}/fhe_model/*'))
|
| 30 |
# Load the model
|
| 31 |
fhe_model = FHEModelServer(
|
| 32 |
Path.joinpath(current_dir, "fhe_model")
|
| 33 |
)
|
|
|
|
| 34 |
print(fhe_model)
|
| 35 |
+
print('1111', current_dir)
|
| 36 |
class PredictRequest(BaseModel):
|
| 37 |
evaluation_key: str
|
| 38 |
encrypted_encoding: str
|