Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Knowledge Assistant</title> | |
<link rel="stylesheet" href="static/style.css"> | |
<script src="static/script.js" defer></script> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>Enter Details</h1> | |
<form action="/" method="POST"> | |
<label for="user_text">Enter Your Text: </label> | |
<textarea name="user_text" maxlength="5000" rows="4" cols="50" oninput="updateCount()" required>{{ user_text if user_text else '' }}</textarea> | |
<p id="charCount">5000 characters remaining</p> | |
<br><br> | |
<label for="tasks">Choose a Task:</label> | |
<select name="tasks" required onchange="toggleElements()"> | |
<option value="none">--Select--</option> | |
<option value="summarization" {% if task == 'summarization' %}selected{% endif %}>Summarize Text</option> | |
<option value="keywords" {% if task == 'keywords' %}selected{% endif %}>Get Keywords</option> | |
<option value="Q&A" {% if task == 'Q&A' %}selected{% endif %}>Ask Questions</option> | |
</select> | |
<br><br> | |
<label id="number_label" for="user_number" style="display: none;"></label> | |
<input type="number" id="number" name="user_number" style="display: none;"> | |
<label id="question_label" for="user_question" style="display: none;">Enter Your Question:</label> | |
<input type="text" id="question" name="user_question" style="display: none;"> | |
<br><br> | |
<button type="submit" id="submit_btn" disabled>Submit</button> | |
</form> | |
{% if text %} | |
<div class="result-section"> | |
<h2>Result for {{ task }}:</h2> | |
<p>{{ text }}</p> | |
</div> | |
{% endif %} | |
</div> | |
</body> | |
</html> |