Merge branch 'master' of github.com:Microsoft/SpeciesClassification

This commit is contained in:
Marcel Simon 2019-12-03 05:41:49 +00:00
Родитель 90d509923c 2e415472c3
Коммит d5716292ec
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -18,6 +18,8 @@ from flask import send_file
from predict import Predict
from sample_images import Sample_images
from flask import escape
search = Search()
predict = Predict()
sample_images = Sample_images()
@ -216,7 +218,7 @@ def get_images():
@app.route('/get_search_results', methods=['GET'])
def get_search_results():
try:
search_string = request.args.get("searchString")
search_string = escape(request.args.get("searchString"))
search.do_search(search_string)
result = search.result.fillna(' ')
@ -230,7 +232,7 @@ def get_search_results():
except Exception as e:
print(str(e))
return str(e)
return "Error occurred while processing the request. The search term could be invalid"
@app.route('/get_more_search_images', methods=['GET'])
def get_more_search_images():
@ -298,4 +300,4 @@ def check_image_url():
if __name__ == "__main__":
app.run(threaded=True, host="0.0.0.0")
app.run(threaded=True, host="0.0.0.0")