Spaces:
Runtime error
Runtime error
| <html> | |
| <head> | |
| <title>Text Summarization</title> | |
| <link rel="stylesheet" href="{{ url_for('static', filename='TextSummarization.css') }}"> | |
| <!-- Bootstrap CSS --> | |
| <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous"> | |
| </head> | |
| <body> | |
| <!-- Navigation bar; To go to different pages without having to go back to index/home page --> | |
| <nav class="navbar navbar-expand-lg bg-body-tertiary"> | |
| <div class="container-fluid"> | |
| <a class="navbar-brand" href="{{ url_for('index') }}">Home</a> | |
| <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation"> | |
| <span class="navbar-toggler-icon"></span> | |
| </button> | |
| <div class="collapse navbar-collapse" id="navbarNavAltMarkup"> | |
| <div class="navbar-nav"> | |
| <a class="nav-link active" aria-current="page" href="{{ url_for('text_summarization') }}">Summarization</a> | |
| <a class="nav-link" href="{{ url_for('project_breakdown') }}">Task Breakdown</a> | |
| <a class="nav-link" href="{{ url_for('language_translation') }}">Translation</a> | |
| <a class="nav-link" href="{{ url_for('text_generation') }}">Generation</a> | |
| </div> | |
| </div> | |
| </div> | |
| </nav> | |
| <div class="container"> | |
| <div class="logo"> | |
| <img id="refineverseLogo" alt="RefineverseLogo" src="{{ url_for('static', filename='Images/Refineverse logo.png') }}" class="home-image"/> | |
| </div> | |
| <div> | |
| <label class="title">User Story Summarization</label> | |
| <p class="message"> | |
| Splitting large user stories into smaller user stories. | |
| </p> | |
| </div> | |
| </div> | |
| <div class="container"> | |
| <form method="POST" action="#"> | |
| <div class="box"> | |
| <textarea class="textarea" name="input_text" id="input_textarea" placeholder="Please describe your User Story in 'As a _ , I want to _ so that _' format."></textarea> | |
| </div> | |
| <div class="box1"> | |
| <textarea class="textarea1" name="output_text" id="output_textarea" placeholder="Your summarized output goes here!" readonly>{{ summarizedStory }}</textarea> | |
| </div> | |
| <div class="buttons-container"> | |
| <button class="ClearBtn" type="button" onclick="clearTextareas()">Clear</button> | |
| <button class="ViewBtn" type="button" onclick="openPopup()">View History</button> | |
| <button class="SummarizeBtn" type="submit">Summarize</button> | |
| </div> | |
| </form> | |
| </div> | |
| <div class="messages-container"> | |
| <!-- This uses Jinja templating to get all flash messages to be displayed --> | |
| {% with messages = get_flashed_messages(with_categories=true) %} | |
| {% for category, message in messages %} | |
| {% if category == 'error' %} | |
| <div class="alert alert-danger alert-dismissible fade show" role="alert"> | |
| {{ message }} | |
| <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> | |
| </div> | |
| {% else %} | |
| <div class="alert alert-success alert-dismissible fade show" role="alert"> | |
| {{ message }} | |
| <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> | |
| </div> | |
| {% endif %} | |
| {% endfor %} | |
| {% endwith %} | |
| </div> | |
| </div> | |
| <div class="BackBtnContainer"> | |
| <div class="buttons-container"> | |
| <a href="{{ url_for('index') }}"><button class="BackBtn">Back</button></a> | |
| </div> | |
| </div> | |
| <!-- Bootstrap JS Bundle --> | |
| <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script> | |
| <script> | |
| // Function for cleaning content in textboxes | |
| function clearTextareas() | |
| { | |
| document.getElementById('input_textarea').value = ''; | |
| document.getElementById('output_textarea').value = ''; | |
| } | |
| // Function to open a popup window using Flask routing | |
| function openPopup() { | |
| // The second argument is used to give the window a name | |
| window.open('/summarization_table', 'summarization_table', 'width=600,height=400'); | |
| } | |
| </script> | |
| </body> | |
| </html> |