网页上看GPU情况
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

38 lines
576 B

from flask import Flask, jsonify
from flask_cors import CORS
import threading
import paramiko
import time
#region 全局
app = Flask(__name__)
CORS(app)
port = 15002
#endregion
#region 接口
# 测试用
@app.route('/')
def hello():
return 'hi. —— CheckGPUsWeb'
@app.route('/data', methods=['GET'])
def get_data():
data = {'name': 'John', 'age': 25, 'city': 'New York'}
return jsonify(data)
# 开始连接服务器
def connect_server():
pass
#endregion
# 测试
def test():
app.run(debug=True, port=port)
if __name__ == '__main__':
test()