<commit_before>from flask import Flask
from flask import jsonify
from flask import request
import requests


app = Flask(__name__)


def follow_bitly(url):
    response = requests.head(url, allow_redirects=True)
    return response.url


@app.route('/follow', methods=['POST'])
def follow():
    bitly_url = request.get_json().get('url')
    return jsonify({
        'url': follow_bitly(bitly_url)
    })


@app.route('/')
def index():
    return ''


if __name__ == '__main__':
    app.run(debug=True)<commit_msg>It works...now for some styling<commit_after>from flask import Flask
from flask import jsonify
from flask import render_template
from flask import request
import requests


app = Flask(__name__)


def follow_bitly(url):
    response = requests.head(url, allow_redirects=True)
    return response.url


@app.route('/follow', methods=['POST'])
def follow():
    bitly_url = request.get_json().get('url')
    return jsonify({
        'url': follow_bitly(bitly_url)
    })


@app.route('/')
def index():
    return render_template('index.html')


if __name__ == '__main__':
    app.run(debug=True)
{'fraction_non_alphanumeric': 0.13369467028003612, 'fraction_numerical': 0.0, 'mean_word_length': 4.153488372093023, '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': '7001388', 'n_tokens_mistral': 371, 'n_tokens_neox': 351, 'n_words': 90}