dzenzzz commited on
Commit
64ba6df
·
verified ·
1 Parent(s): b015511

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -11,12 +11,12 @@ neural_searcher = NeuralSearcher(collection_name=os.getenv('COLLECTION_NAME'))
11
 
12
  @app.get("/api/search")
13
  async def search(q: str):
14
- if not q:
15
- raise HTTPException(status_code=400, detail="Bad request.")
16
 
17
- try:
18
  data = await neural_searcher.search(text=q)
19
  return data
20
- except:
21
- raise HTTPException(status_code=500, detail="Internal server error.")
22
 
 
11
 
12
  @app.get("/api/search")
13
  async def search(q: str):
14
+ # if not q:
15
+ # raise HTTPException(status_code=400, detail="Bad request.")
16
 
17
+ # try:
18
  data = await neural_searcher.search(text=q)
19
  return data
20
+ # except:
21
+ # raise HTTPException(status_code=500, detail="Internal server error.")
22