feat: add endpoint to view dataset for debug
This commit is contained in:
@@ -41,6 +41,13 @@ def upload_data():
|
||||
except Exception as e:
|
||||
return jsonify({"error": f"An unexpected error occurred: {str(e)}"}), 500
|
||||
|
||||
@app.route('/dataset', methods=['GET'])
|
||||
def get_dataset():
|
||||
if stat_obj is None:
|
||||
return jsonify({"error": "No data uploaded"}), 400
|
||||
|
||||
return jsonify(stat_obj.df.to_dict(orient="records")), 200
|
||||
|
||||
@app.route('/stats/content', methods=['GET'])
|
||||
def word_frequencies():
|
||||
if stat_obj is None:
|
||||
|
||||
Reference in New Issue
Block a user