Spaces:
Sleeping
Sleeping
Stanislav
commited on
Commit
·
4f81b2c
1
Parent(s):
c2a8ffe
feat: run uvicorn in run_fastapi
Browse files- Dockerfile +1 -1
- README.md +1 -1
- app.py +0 -1
- run_fastapi.py +4 -0
- space.yaml +1 -1
Dockerfile
CHANGED
@@ -22,4 +22,4 @@ COPY . .
|
|
22 |
RUN pip install --no-cache-dir -r requirements.txt
|
23 |
|
24 |
# Start FastAPI server
|
25 |
-
CMD ["python", "
|
|
|
22 |
RUN pip install --no-cache-dir -r requirements.txt
|
23 |
|
24 |
# Start FastAPI server
|
25 |
+
CMD ["python", "run_fastapi.py"]
|
README.md
CHANGED
@@ -6,7 +6,7 @@ colorTo: "green"
|
|
6 |
sdk: "gradio"
|
7 |
sdk_version: "3.0"
|
8 |
python_version: "3.10"
|
9 |
-
app_file: "
|
10 |
fullWidth: true
|
11 |
header: "default"
|
12 |
short_description: "AI-powered object cutter using Grounding DINO and SAM."
|
|
|
6 |
sdk: "gradio"
|
7 |
sdk_version: "3.0"
|
8 |
python_version: "3.10"
|
9 |
+
app_file: "run_fastapi.py"
|
10 |
fullWidth: true
|
11 |
header: "default"
|
12 |
short_description: "AI-powered object cutter using Grounding DINO and SAM."
|
app.py
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
from run_fastapi import app
|
|
|
|
run_fastapi.py
CHANGED
@@ -163,3 +163,7 @@ async def finalize_selection(
|
|
163 |
"message": f"Saved {len(selected)} file(s). Session {session_id} closed."
|
164 |
})
|
165 |
|
|
|
|
|
|
|
|
|
|
163 |
"message": f"Saved {len(selected)} file(s). Session {session_id} closed."
|
164 |
})
|
165 |
|
166 |
+
if __name__ == "__main__":
|
167 |
+
import uvicorn
|
168 |
+
uvicorn.run("run_fast_api:app", host="0.0.0.0", port=7860)
|
169 |
+
|
space.yaml
CHANGED
@@ -4,7 +4,7 @@ colorFrom: "green"
|
|
4 |
colorTo: "green"
|
5 |
sdk: "docker"
|
6 |
python_version: "3.10"
|
7 |
-
app_file: "
|
8 |
fullWidth: true
|
9 |
pinned: true
|
10 |
license: "mit"
|
|
|
4 |
colorTo: "green"
|
5 |
sdk: "docker"
|
6 |
python_version: "3.10"
|
7 |
+
app_file: "run_fastapi.py"
|
8 |
fullWidth: true
|
9 |
pinned: true
|
10 |
license: "mit"
|