<commit_before>from flask import Flask, render_template
from dance_layers import get_parts
import json
from copy import copy


app = Flask(__name__)
ELEMENTS_FILE = "dance_elements.json"
START_WITH_FEET = True


def load_json():
    with open(ELEMENTS_FILE, 'r') as inputs:
        file_contents = inputs.read()
        return json.loads(file_contents)

dance_elements = load_json()


@app.route("/")
def index():
    first, second, third = get_parts(
        copy(dance_elements), START_WITH_FEET)
    return render_template(
        'index.html',
        first=first, second=second, third=third)<commit_msg>Using abosulte path as python anywhere was having issue with relattive one<commit_after>from flask import Flask, render_template
from dance_layers import get_parts
import json
from copy import copy


app = Flask(__name__)
ELEMENTS_FILE = "/home/saoili/DanceLayers/DanceLayers/dance_elements.json"
START_WITH_FEET = True


def load_json():
    with open(ELEMENTS_FILE, 'r') as inputs:
        file_contents = inputs.read()
        return json.loads(file_contents)

dance_elements = load_json()


@app.route("/")
def index():
    first, second, third = get_parts(
        copy(dance_elements), START_WITH_FEET)
    return render_template(
        'index.html',
        first=first, second=second, third=third)
{'fraction_non_alphanumeric': 0.09498480243161095, 'fraction_numerical': 0.0, 'mean_word_length': 4.1647058823529415, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5807510', 'n_tokens_mistral': 427, 'n_tokens_neox': 411, 'n_words': 108}