Initialize evaluation protocols and examples; Implement one kind of eval; Update requirements
This commit is contained in:
@@ -74,6 +74,22 @@ def capture_screen_with_cursor():
|
||||
return send_file(file_path, mimetype='image/png')
|
||||
|
||||
|
||||
@app.route('/file', methods=['POST'])
|
||||
def get_file():
|
||||
# Retrieve filename from the POST request
|
||||
if 'file_path' in request.form:
|
||||
file_path = request.form['file_path']
|
||||
else:
|
||||
return jsonify({"error": "file_path is required"}), 400
|
||||
|
||||
try:
|
||||
# Check if the file exists and send it to the user
|
||||
return send_file(file_path, as_attachment=True)
|
||||
except FileNotFoundError:
|
||||
# If the file is not found, return a 404 error
|
||||
return jsonify({"error": "File not found"}), 404
|
||||
|
||||
|
||||
@app.route('/platform', methods=['GET'])
|
||||
def get_platform():
|
||||
return platform.system()
|
||||
|
||||
Reference in New Issue
Block a user