if(state==1): return "fail" else: return "success" # @app.route('/staue', methods=['POST'])
时间: 2024-05-13 14:14:35 浏览: 46
nmf的matlab代码-hNMF:https://estasney.github.io/hNMF/
It seems that there is a typo in your code. "staue" should be "state" in the route definition. Here is a corrected version:
```
@app.route('/state', methods=['POST'])
def check_state():
if state == 1:
return "fail"
else:
return "success"
```
Assuming that `state` is defined somewhere in your code, this route will respond to HTTP POST requests to the `/state` endpoint. If `state` is equal to 1, the function will return "fail". Otherwise, it will return "success".
阅读全文