An error occurred while loading the file. Please try again.
-
Artem Baranovskyi authored
All necessary input data are provided. Python ASYST script (run_LR_SBERT.py) is set with absolute paths. ----------------------------------------------------------- Result: On script execution we obtain just once the result at /var/www/html/moodle/asyst/Source/Skript/outputs/test.tsv ----------------------------------------------------------- TODO: Create an API to use script run_LR_SBERT.py on http://127.0.0.1:5000/api/data or like that. Configure relative paths at ASYST script (run_LR_SBERT.py).
c1481f72
# api.py
from flask import Flask, jsonify
app = Flask(__name__)
# Example of an endpoint returning JSON data
@app.route('/api/data', methods=['GET'])
def get_data():
# TODO: use run_LR_SBERT.py ASYST script instead
data = {
'message': 'Hello from Python API!',
'data': {
'key1': 'value1',
'key2': 'value2'
}
}
return jsonify(data)
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)