File size: 2,626 Bytes
902b8fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap demo</title>
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
  </head>

    <style>

        body {

            padding: 20px;

            background:black;

            color: white

        }



        .container {

            margin-top:10px;

            max-width: 600px;

        }



        h1 {

            text-align: center;

            margin-bottom: 30px;

        }



        textarea {

            width: 100%;

            height: 200px;

            resize: none;

        }



        .btn-primary {

            margin-top: 20px;

            width: 100%;

        }



        .corrected-text {

            margin-top: 30px;

            font-size: 18px;

            font-weight: bold;

        }

    </style>


  <body>
    <h1 class="text-center">Grammar And Spell Checker</h1>
    <div class="container">
        <form action="/spell" method="post" enctype="multipart/form-data">
            <div class="form-group">
                <label for="text">Type your text here</label>
                <textarea class="form-control" id="text" name="text"></textarea>
            </div>
            <button type="submit" class="btn btn-primary">Correct</button>
        </form>

        {% if corrected_text and corrected_grammar %}
          <h5>Corrected Word: <br> {{corrected_text}}</h5>
          <h5>Grammar Mistakes: <br> {{corrected_grammar}}</h5>
        {% endif %}
    </div>

    <div class="container">
        <form action="/grammar" method="post" enctype="multipart/form-data">
            <div class="form-group">
                <label for="file">Upload File</label>
                <input type="file" name="file" class="form-control">
            </div>
            <button type="submit" class="btn btn-primary">Correct</button>
        </form>
         {% if corrected_file_text and corrected_file_grammar %}
          <h5>Corrected Word: <br> {{corrected_file_text}}</h5>
          <h5>Grammar Mistakes: <br> {{corrected_file_grammar}}</h5>
        {% endif %}
    </div>


    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
  </body>
</html>