imseldrith commited on
Commit
33d18f5
·
1 Parent(s): 49be6a8

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +55 -47
templates/index.html CHANGED
@@ -1,48 +1,56 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Paraphrase Generator</title>
5
- <link rel="stylesheet" type="text/css" href="style.css">
6
- </head>
7
- <body>
8
- <header>
9
- <h1>Paraphrase Generator</h1>
10
- </header>
11
- <main>
12
- <div class="container">
13
- <form>
14
- <textarea id="input-text" rows="10" cols="50" placeholder="Enter your text here"></textarea><br><br>
15
- <div class="options">
16
- <label for="grammar-correction">Grammar Correction</label>
17
- <input type="checkbox" id="grammar-correction" name="grammar-correction"><br><br>
18
- <label for="remove-special-chars">Remove Special Characters</label>
19
- <input type="checkbox" id="remove-special-chars" name="remove-special-chars"><br><br>
20
- <label for="text-summarization">Text Summarization</label>
21
- <input type="checkbox" id="text-summarization" name="text-summarization"><br><br>
22
- <label for="multilingual-support">Multilingual Support</label>
23
- <input type="checkbox" id="multilingual-support" name="multilingual-support"><br><br>
24
- <label for="custom-synonyms">Custom Synonyms</label>
25
- <input type="text" id="custom-synonyms" name="custom-synonyms" placeholder="Enter custom synonyms separated by commas"><br><br>
26
- </div>
27
- <button id="generate-paraphrase" type="button">Generate Paraphrase</button><br><br>
28
- </form>
29
- </div>
30
- <div class="output">
31
- <h2>Paraphrased Text</h2>
32
- <textarea id="paraphrased-text" rows="10" cols="50" readonly></textarea><br><br>
33
- <div class="output-options">
34
- <label for="output-customization">Output Customization</label>
35
- <input type="range" id="output-customization" name="output-customization" min="1" max="100" value="50"><br><br>
36
- <button id="copy-to-clipboard" type="button">Copy to Clipboard</button><br><br>
37
- </div>
38
- <div class="progress-bar">
39
- <progress id="paraphrase-progress" value="0" max="100"></progress>
40
- </div>
41
- </div>
42
- </main>
43
- <footer>
44
- <p>Create with ❤️ By Ashiq Hussain.</p>
45
- </footer>
46
- <script src="main.js"></script>
47
- </body>
 
 
 
 
 
 
 
 
48
  </html>
 
1
+ <html<html>
2
+ <head>
3
+ <title>Paraphrasing Webapp</title>
4
+ <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
5
+ <script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
6
+ <script type="text/javascript">
7
+ $(document).ready(function(){
8
+ var clipboard = new ClipboardJS('.copy-btn');
9
+ clipboard.on('success', function(e) {
10
+ alert("Paraphrased Text Copied to Clipboard!");
11
+ });
12
+ clipboard.on('error', function(e) {
13
+ alert("Unable to Copy. Please try again.");
14
+ });
15
+ $('#correct-grammar').click(function(){
16
+ $.post("/correct_grammar", {text: $('#input-text').val()}, function(data){
17
+ $('#input-text').val(data.corrected_text);
18
+ });
19
+ });
20
+ $('#remove-special-characters').click(function(){
21
+ $.post("/remove_special_characters", {text: $('#input-text').val()}, function(data){
22
+ $('#input-text').val(data.filtered_text);
23
+ });
24
+ });
25
+ $('#paraphrase').click(function(){
26
+ $.post("/paraphrase", {text: $('#input-text').val()}, function(data){
27
+ $('#output-text').val(data.paraphrased_text);
28
+ });
29
+ });
30
+ $('#summarize').click(function(){
31
+ $.post("/summarize", {text: $('#input-text').val()}, function(data){
32
+ $('#output-text').val(data.summarized_text);
33
+ });
34
+ });
35
+ $('#detect-emotion').click(function(){
36
+ $.post("/detect_emotion", {text: $('#input-text').val()}, function(data){
37
+ alert("Detected Emotion: " + data.emotion);
38
+ });
39
+ });
40
+ });
41
+ </script>
42
+ </head>
43
+ <body>
44
+ <h1>Paraphrasing Webapp</h1>
45
+ <label for="input-text">Input Text:</label>
46
+ <textarea id="input-text"></textarea><br><br>
47
+ <button id="correct-grammar">Correct Grammar</button>
48
+ <button id="remove-special-characters">Remove Special Characters</button><br><br>
49
+ <label for="output-text">Output Text:</label>
50
+ <textarea id="output-text"></textarea><br><br>
51
+ <button id="paraphrase">Paraphrase</button>
52
+ <button id="summarize">Summarize</button>
53
+ <button id="detect-emotion">Detect Emotion</button><br><br>
54
+ <button class="copy-btn" data-clipboard-target="#output-text">Copy Paraphrased Text</button>
55
+ </body>
56
  </html>