<commit_before>import io
import os
import re
import sys
import json
import subprocess
import requests
from flask import Flask, request, abort
from blame import Blame

app = Flask(__name__)

@app.route("/payload", methods=["POST"])
def payload():
    print(request.json)

@app.route("/test", methods=["GET"])
def test():
    bl = Blame()
    tst = bl.parse_blame("Hey !")
    return tst

if __name__ == "__main__":
    try:
        port_number = int(sys.argv[1])
    except ValueError:<commit_msg>Use extract and predict<commit_after>import io
import os
import re
import sys
import json
import subprocess
import requests
from flask import Flask, request, abort
from extract import Extract
from predict import Predict


app = Flask(__name__)

@app.route("/payload", methods=["POST"])
def payload():
    print(request.json)
    exrt = Extract()
    prdt = Predict()

    ex.get_parsed_diff('/home/rajika/projects/prepack')
    prdt.train([{'file': 'src', 'line': '8', 'timestamp': '2017-04-24T17:07:51-0700'}])
    
    return app.response_class(['Ok', 'Fine'], content_type='application/json')


# @app.route("/test", methods=["GET"])
# def test():
#     parse = Parse()
#     diff = parse.parse_diff_file("/data/001.diff")
#     return app.response_class(json.dumps(diff), content_type='application/json')

if __name__ == "__main__":
    try:
        port_number = int(sys.argv[1])
    except ValueError:
{'fraction_non_alphanumeric': 0.14896650035637918, 'fraction_numerical': 0.017106200997861726, 'mean_word_length': 4.219330855018588, 'pattern_counts': {'":': 2, '<': 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': '7336604', 'n_tokens_mistral': 471, 'n_tokens_neox': 453, 'n_words': 120}