Spaces:
Sleeping
Sleeping
bertugmirasyedi
commited on
Commit
·
0c35d0a
1
Parent(s):
c9dd349
Update app.py
Browse files
app.py
CHANGED
@@ -1,23 +1,8 @@
|
|
1 |
from fastapi import FastAPI
|
2 |
-
from fastapi.middleware.cors import CORSMiddleware
|
3 |
-
import sys
|
4 |
-
|
5 |
-
# Set the maximum recursion depth to 10000
|
6 |
-
sys.setrecursionlimit(10000)
|
7 |
|
8 |
# Define the FastAPI app
|
9 |
app = FastAPI()
|
10 |
|
11 |
-
# Add the CORS middleware to the app
|
12 |
-
app.add_middleware(
|
13 |
-
CORSMiddleware,
|
14 |
-
allow_origins=["*"],
|
15 |
-
allow_credentials=True,
|
16 |
-
allow_methods=["*"],
|
17 |
-
allow_headers=["*"],
|
18 |
-
)
|
19 |
-
|
20 |
-
|
21 |
@app.get("/search={query}&similarity={similarity}")
|
22 |
def search(query, similarity=False):
|
23 |
import time
|
|
|
1 |
from fastapi import FastAPI
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
# Define the FastAPI app
|
4 |
app = FastAPI()
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
@app.get("/search={query}&similarity={similarity}")
|
7 |
def search(query, similarity=False):
|
8 |
import time
|