Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
from fastapi import FastAPI, Request, HTTPException
|
| 2 |
from fastapi.responses import JSONResponse
|
| 3 |
-
from fastapi.middleware.cors import CORSMiddleware
|
| 4 |
from webscout import WEBS, transcriber
|
| 5 |
|
| 6 |
# from webscout.websx_search import WEBSX
|
|
@@ -10,14 +9,6 @@ from fastapi.encoders import jsonable_encoder
|
|
| 10 |
|
| 11 |
app = FastAPI()
|
| 12 |
|
| 13 |
-
app.add_middleware(
|
| 14 |
-
CORSMiddleware,
|
| 15 |
-
allow_origins=["*"],
|
| 16 |
-
allow_credentials=True,
|
| 17 |
-
allow_methods=["*"],
|
| 18 |
-
allow_headers=["*"],
|
| 19 |
-
)
|
| 20 |
-
|
| 21 |
class SearchQuery(BaseModel):
|
| 22 |
q: str = Field(..., description="The search query string")
|
| 23 |
max_results: int = Field(10, description="The maximum number of results to return", ge=1, le=100)
|
|
|
|
| 1 |
from fastapi import FastAPI, Request, HTTPException
|
| 2 |
from fastapi.responses import JSONResponse
|
|
|
|
| 3 |
from webscout import WEBS, transcriber
|
| 4 |
|
| 5 |
# from webscout.websx_search import WEBSX
|
|
|
|
| 9 |
|
| 10 |
app = FastAPI()
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
class SearchQuery(BaseModel):
|
| 13 |
q: str = Field(..., description="The search query string")
|
| 14 |
max_results: int = Field(10, description="The maximum number of results to return", ge=1, le=100)
|