-
-
Save veekaybee/fdaeb6ca5b564227e7cfe6fe2c364b41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this allows us to build a query string as well as use the search box | |
@app.route("/search", methods=["POST", "GET"]) | |
def search() -> str: | |
word = None | |
if request.method == "POST": | |
word = request.form.get("query", "") | |
elif request.method == "GET": | |
word = request.args.get("query", "") | |
return get_model_results(word, retriever) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment