Spaces:
Sleeping
Sleeping
fabiogra
commited on
Commit
•
9a79bec
1
Parent(s):
ae202f9
fix: remove unused file and isort in precommit
Browse files- .pre-commit-config.yaml +0 -5
- .streamlit/config.toml +1 -1
- app/_fastapi_server.py +0 -20
.pre-commit-config.yaml
CHANGED
@@ -17,11 +17,6 @@ repos:
|
|
17 |
hooks:
|
18 |
- id: black
|
19 |
|
20 |
-
- repo: https://github.com/pycqa/isort
|
21 |
-
rev: 5.12.0
|
22 |
-
hooks:
|
23 |
-
- id: isort
|
24 |
-
|
25 |
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
26 |
rev: 'v0.0.277'
|
27 |
hooks:
|
|
|
17 |
hooks:
|
18 |
- id: black
|
19 |
|
|
|
|
|
|
|
|
|
|
|
20 |
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
21 |
rev: 'v0.0.277'
|
22 |
hooks:
|
.streamlit/config.toml
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
[server]
|
2 |
-
enableXsrfProtection = false
|
|
|
1 |
[server]
|
2 |
+
enableXsrfProtection = false
|
app/_fastapi_server.py
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
from fastapi import FastAPI
|
2 |
-
from fastapi.responses import FileResponse
|
3 |
-
from urllib.parse import unquote
|
4 |
-
|
5 |
-
import os
|
6 |
-
|
7 |
-
app = FastAPI()
|
8 |
-
|
9 |
-
|
10 |
-
@app.get("/streaming/{path:path}")
|
11 |
-
async def serve_streaming(path: str):
|
12 |
-
# Decode URL-encoded characters
|
13 |
-
decoded_path = unquote(path)
|
14 |
-
return FileResponse(decoded_path, filename=os.path.basename(decoded_path))
|
15 |
-
|
16 |
-
|
17 |
-
if __name__ == "__main__":
|
18 |
-
import uvicorn
|
19 |
-
|
20 |
-
uvicorn.run(app, host="127.0.0.1", port=8000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|