Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files
app.py
CHANGED
|
@@ -21,10 +21,10 @@ import numpy as np
|
|
| 21 |
import pdb
|
| 22 |
# This repository's directory
|
| 23 |
REPO_DIR = Path(__file__).parent
|
| 24 |
-
|
| 25 |
|
| 26 |
|
| 27 |
-
subprocess.Popen(["uvicorn", "server:app", "--port", "3000"], cwd=REPO_DIR)
|
| 28 |
|
| 29 |
# if not exists, create a directory for the FHE keys called .fhe_keys
|
| 30 |
if not os.path.exists(".fhe_keys"):
|
|
@@ -191,6 +191,16 @@ def process_pipeline(test_file):
|
|
| 191 |
|
| 192 |
if __name__ == "__main__":
|
| 193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
app = gr.Interface(
|
| 195 |
|
| 196 |
fn=process_pipeline,
|
|
@@ -206,5 +216,4 @@ if __name__ == "__main__":
|
|
| 206 |
title="FHE Model",
|
| 207 |
description="This is a FHE Model",
|
| 208 |
)
|
| 209 |
-
|
| 210 |
-
app.launch() #share=True)
|
|
|
|
| 21 |
import pdb
|
| 22 |
# This repository's directory
|
| 23 |
REPO_DIR = Path(__file__).parent
|
| 24 |
+
subprocess.Popen(["uvicorn", "server:app"], cwd=REPO_DIR)
|
| 25 |
|
| 26 |
|
| 27 |
+
#subprocess.Popen(["uvicorn", "server:app", "--port", "3000"], cwd=REPO_DIR)
|
| 28 |
|
| 29 |
# if not exists, create a directory for the FHE keys called .fhe_keys
|
| 30 |
if not os.path.exists(".fhe_keys"):
|
|
|
|
| 191 |
|
| 192 |
if __name__ == "__main__":
|
| 193 |
|
| 194 |
+
with gr.Block() as demo:
|
| 195 |
+
print("Starting the FHE Model")
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
demo.launch() #share=True)
|
| 201 |
+
|
| 202 |
+
|
| 203 |
+
"""
|
| 204 |
app = gr.Interface(
|
| 205 |
|
| 206 |
fn=process_pipeline,
|
|
|
|
| 216 |
title="FHE Model",
|
| 217 |
description="This is a FHE Model",
|
| 218 |
)
|
| 219 |
+
"""
|
|
|