Spaces:
Running
Running
File size: 330 Bytes
1a6d216 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
from fastapi import FastAPI
from neural_searcher import NeuralSearcher
app = FastAPI()
neural_searcher = NeuralSearcher(collection_name="odluke-demo")
@app.get("/")
async def root():
return {"message": "Hello World"}
@app.get("/api/search")
def search_startup(q: str):
return {"result": neural_searcher.search(text=q)} |