|
<!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> |