Spaces:
Configuration error
Configuration error
Paramveer singh commited on
Commit ·
91ba8ea
1
Parent(s): e5bb9f2
Final: Restored multi-mode structure
Browse files- Dockerfile +1 -1
- openenv.yaml +1 -1
- pyproject.toml +10 -14
- server/__init__.py +0 -0
- main.py → server/app.py +1 -1
Dockerfile
CHANGED
|
@@ -15,4 +15,4 @@ COPY . .
|
|
| 15 |
EXPOSE 7860
|
| 16 |
|
| 17 |
# Start the FastAPI server using Uvicorn
|
| 18 |
-
CMD ["uvicorn", "
|
|
|
|
| 15 |
EXPOSE 7860
|
| 16 |
|
| 17 |
# Start the FastAPI server using Uvicorn
|
| 18 |
+
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]
|
openenv.yaml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
name: data-privacy-env
|
| 2 |
version: 1.0.0
|
| 3 |
type: environment
|
| 4 |
-
entry_point:
|
|
|
|
| 1 |
name: data-privacy-env
|
| 2 |
version: 1.0.0
|
| 3 |
type: environment
|
| 4 |
+
entry_point: server.app:app
|
pyproject.toml
CHANGED
|
@@ -1,28 +1,24 @@
|
|
| 1 |
[build-system]
|
| 2 |
-
requires = ["setuptools>=61.0"
|
| 3 |
build-backend = "setuptools.build_meta"
|
| 4 |
|
| 5 |
[project]
|
| 6 |
name = "data-privacy-env"
|
| 7 |
version = "1.0.0"
|
| 8 |
-
description = "
|
| 9 |
readme = "README.md"
|
| 10 |
requires-python = ">=3.10"
|
| 11 |
dependencies = [
|
| 12 |
-
"fastapi
|
| 13 |
-
"
|
| 14 |
-
"
|
| 15 |
-
"openai
|
| 16 |
-
"openenv-core
|
| 17 |
]
|
| 18 |
|
| 19 |
[project.scripts]
|
| 20 |
-
|
| 21 |
-
server = "main:main"
|
| 22 |
|
| 23 |
[tool.setuptools]
|
| 24 |
-
|
| 25 |
-
py-modules = ["env", "models"
|
| 26 |
-
|
| 27 |
-
[tool.setuptools.exclude-package-data]
|
| 28 |
-
"*" = ["*.pyc", "__pycache__/*"]
|
|
|
|
| 1 |
[build-system]
|
| 2 |
+
requires = ["setuptools>=61.0"]
|
| 3 |
build-backend = "setuptools.build_meta"
|
| 4 |
|
| 5 |
[project]
|
| 6 |
name = "data-privacy-env"
|
| 7 |
version = "1.0.0"
|
| 8 |
+
description = "PII Remediation Environment"
|
| 9 |
readme = "README.md"
|
| 10 |
requires-python = ">=3.10"
|
| 11 |
dependencies = [
|
| 12 |
+
"fastapi",
|
| 13 |
+
"uvicorn",
|
| 14 |
+
"pydantic",
|
| 15 |
+
"openai",
|
| 16 |
+
"openenv-core"
|
| 17 |
]
|
| 18 |
|
| 19 |
[project.scripts]
|
| 20 |
+
server = "server.app:main"
|
|
|
|
| 21 |
|
| 22 |
[tool.setuptools]
|
| 23 |
+
packages = ["server"]
|
| 24 |
+
py-modules = ["env", "models"]
|
|
|
|
|
|
|
|
|
server/__init__.py
ADDED
|
File without changes
|
main.py → server/app.py
RENAMED
|
@@ -24,7 +24,7 @@ async def root():
|
|
| 24 |
# 4. The 'main' function required by the pyproject.toml entry point
|
| 25 |
# The validator calls this to spin up your environment programmatically
|
| 26 |
def main():
|
| 27 |
-
uvicorn.run("
|
| 28 |
|
| 29 |
if __name__ == "__main__":
|
| 30 |
main()
|
|
|
|
| 24 |
# 4. The 'main' function required by the pyproject.toml entry point
|
| 25 |
# The validator calls this to spin up your environment programmatically
|
| 26 |
def main():
|
| 27 |
+
uvicorn.run("server.app:app", host="0.0.0.0", port=7860, reload=False)
|
| 28 |
|
| 29 |
if __name__ == "__main__":
|
| 30 |
main()
|