Spaces:
Running
Running
File size: 3,031 Bytes
d38b838 137a655 33d18f5 d38b838 33d18f5 d38b838 1652bce |
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 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Paraphrasing Webapp</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
</head>
<body>
<div class="container mt-5">
<h1 class="text-center">Paraphrasing Webapp</h1>
<form method="post">
<div class="form-group">
<label for="text">Enter Text:</label>
<textarea class="form-control" id="text" rows="3" name="text">{{ text }}</textarea>
</div>
<div class="form-group">
<label for="paraphrase_option">Paraphrasing Option:</label>
<select class="form-control" id="paraphrase_option" name="paraphrase_option">
<option value="repeat">Repeat</option>
<option value="emotion_detector">Emotion Detector</option>
</select>
</div>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="remove_special_chars" name="remove_special_chars">
<label class="form-check-label" for="remove_special_chars">Remove Special Characters</label>
</div>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="correct_grammar" name="correct_grammar">
<label class="form-check-label" for="correct_grammar">Correct Grammar</label>
</div>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="summarize" name="summarize">
<label class="form-check-label" for="summarize">Summarize</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
{% if paraphrased_text %}
<h3 class="mt-3">Paraphrased Text:</h3>
<p>{{ paraphrased_text }}</p>
<button class="btn btn-secondary" id="copy_button">Copy to Clipboard</button>
<div class="progress mt-3">
<div class="progress-bar" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div>
{% endif %}
</div>
</body>
<script>
$("#copy_button").click(function() {
var text = $("p").text();
var temp = $("<input>");
$("body").append(temp);
temp.val(text).select();
document.execCommand("copy");
temp.remove();
alert("Paraphrased text copied to clipboard.");
});
</script>
</html> |