We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d40c480 commit f0a1eb6Copy full SHA for f0a1eb6
app/__init__.py
@@ -10,20 +10,14 @@
10
11
@app.route('/test', methods=['GET'])
12
def getResult():
13
- input = np.array([[5.5, 2.4, 2.7, 1.]])
14
- result = model.predict(input)
+ result = 1
15
return jsonify({'result': str(result)})
16
17
@app.route('/predict', methods=['POST'])
18
def postInput():
19
# 取得前端傳過來的數值
20
insertValues = request.get_json()
21
- x1=insertValues['sepalLengthCm']
22
- x2=insertValues['sepalWidthCm']
23
- x3=insertValues['petalLengthCm']
24
- x4=insertValues['petalWidthCm']
25
- input = np.array([[x1, x2, x3, x4]])
+ x1=insertValues['userID']
26
# 進行預測
27
28
-
+ result = x1+1
29
0 commit comments