Commit f772773b authored by Jan Rudolf's avatar Jan Rudolf

ADD mock prediction to classify response

parent 8b0147f0
......@@ -14,6 +14,8 @@ classifiers = {
'mock': MockClassifier()
}
classifier = classifiers['mock']
if not os.path.exists(UPLOAD_FOLDER):
os.mkdir(UPLOAD_FOLDER)
......@@ -60,8 +62,9 @@ def classify():
try:
os.mkdir(folder)
file.save(filepath)
# prediction = classifier.classify_file(filepath)
prediction = classifier.classify_file(filepath)
return jsonify({
"prediction": prediction,
"filename": file.filename,
"soundwave": generate_soundwave(filepath)
})
......@@ -77,3 +80,4 @@ def classify():
if __name__ == '__main__':
app.run(port=4666)
app.run(port=4667)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment