Spaces:
Sleeping
Sleeping
fix
Browse files- fileservice.py +0 -5
- requirements.txt +1 -1
fileservice.py
CHANGED
@@ -1,7 +1,5 @@
|
|
1 |
from fastapi import FastAPI, Request, Response
|
2 |
|
3 |
-
from pydantic import BaseModel, ConfigDict
|
4 |
-
|
5 |
filenames = ["js/interactive_grid.js"]
|
6 |
contents = "\n".join(
|
7 |
[f"<script type='text/javascript' src='{x}'></script>" for x in filenames]
|
@@ -21,9 +19,6 @@ ga_script = """
|
|
21 |
|
22 |
app = FastAPI()
|
23 |
|
24 |
-
class CustomConfig(BaseModel):
|
25 |
-
model_config = ConfigDict(arbitrary_types_allowed=True)
|
26 |
-
|
27 |
|
28 |
@app.middleware("http")
|
29 |
async def insert_js(request: Request, call_next):
|
|
|
1 |
from fastapi import FastAPI, Request, Response
|
2 |
|
|
|
|
|
3 |
filenames = ["js/interactive_grid.js"]
|
4 |
contents = "\n".join(
|
5 |
[f"<script type='text/javascript' src='{x}'></script>" for x in filenames]
|
|
|
19 |
|
20 |
app = FastAPI()
|
21 |
|
|
|
|
|
|
|
22 |
|
23 |
@app.middleware("http")
|
24 |
async def insert_js(request: Request, call_next):
|
requirements.txt
CHANGED
@@ -17,7 +17,7 @@ torchvision
|
|
17 |
torchaudio
|
18 |
tqdm==4.67.1
|
19 |
fastapi
|
20 |
-
pydantic
|
21 |
uvicorn[standard]
|
22 |
faiss-cpu==1.7.2
|
23 |
|
|
|
17 |
torchaudio
|
18 |
tqdm==4.67.1
|
19 |
fastapi
|
20 |
+
pydantic<2
|
21 |
uvicorn[standard]
|
22 |
faiss-cpu==1.7.2
|
23 |
|