girisagar46 / FYPFruitClassifier

Line too long FLK-E501
Style
Minor
9 occurrences in this check
line too long (106 > 88 characters)
10
11
12def clean_graph_dir():
13    os.system("rm -rf /home/linuxsagar/PycharmProjects/FruitClassifierTesting/FCTesting/static/histo.png")14
15
16def make_histogram(i_hist, i_hufe, i_ehfe, i_hhfe, dataDir):
line too long (106 > 88 characters)
11    # shutil.rmtree('/home/linuxsagar/PycharmProjects/FruitClassifierTesting/graphs/')
12    # os.mkdir('')
13    # os.remove()
14    os.system("rm -rf /home/linuxsagar/PycharmProjects/FruitClassifierTesting/FCTesting/static/histo.png")
line too long (90 > 88 characters)
60        probability = np.amax(classifier.predict_proba(_new_features))
61
62        # Call method to generate histogram image
63        make_histogram(_custom_image.histogram(), _newHhfe, _newEhfe, _newHaarfe, dataDir)64
65        # The Final result to view
66        result = [
line too long (89 > 88 characters)
64
65        # The Final result to view
66        result = [
67            f"The given input is classified as: {classifier.predict(_new_features)[0]}.",68            f"Probability of prediction: {probability:.1}%"]
69
70        return [result, hue_data, edge_data, haar_data]
line too long (97 > 88 characters)
37def predict():
38    data = predictor()
39    MainServices.clean_dir()
40    return render_template('index.html', result=data[0], hue=data[1], edge=data[2], haar=data[3])41
42
43@app.errorhandler(Exception)
line too long (93 > 88 characters)
13
14
15def allowed_file(filename):
16    return '.' in filename and filename.rsplit('.', 1)[1] in app.config['ALLOWED_EXTENSIONS']17
18
19@app.route('/')
line too long (93 > 88 characters)
 8
 9app = Flask(__name__)
10app.config['UPLOAD_FOLDER'] = '/home/linuxsagar/tempTest'
11app.config['GRAPH_FOLDER'] = '/home/linuxsagar/PycharmProjects/FruitClassifierTesting/graphs'12app.config['ALLOWED_EXTENSIONS'] = {'png', 'jpg', 'jpeg'}
13
14
line too long (92 > 88 characters)
31            img = Image(im)
32            labels.append(im[:-2])
33            features.append(
34                np.concatenate([hhfe.extract(img), ehfe.extract(img), haarfe.extract(img)]))35    return [features, labels]
36
37
line too long (94 > 88 characters)
55        npa = np.asarray(feat)
56        npl = np.asarray(label)
57        scores = cross_val_score(clf, npa, npl, cv=10)
58        print(f"n_estimators = 101 | learning_rate = {i} | cross_val_score = {scores.mean()}")59
60
61# Training function