@app.route('/', methods=['GET', 'POST'])
def index():
    if (request.method == 'POST'):
        url = request.form['url']
        predict = model.predict(url)
        value = predict[1]
        clickbait = predict[2]
        text = predict[3]
        article_title = predict[0]
        model.update(value)
        model.update(clickbait)
        return render_template('index.html', value=value, clickbait=clickbait, text=text, article_title=article_title, url=url)
    else:
        return render_template('index.html')
@app.route('/', methods=['GET', 'POST'])
def index():
    if (request.method == 'POST'):
        url = request.form['url']
        predict = model.predict(url)
        value = predict[1]
        clickbait = predict[2]
        text = predict[3]
        article_title = predict[0]
        model.update(value)
        model.update(clickbait)
        return render_template('index.html', value=value, clickbait=clickbait, text=text, article_title=article_title, url=url)
    else:
        return render_template('index.html')