Spaces:
Runtime error
Runtime error
<html lang="fr"> | |
<head> | |
<title>Text summarization API</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> | |
<link rel="stylesheet" href="{{ url_for('templates', path='templates/site_style/css/main.css') }}" /> | |
<script> | |
function customReset() | |
{ | |
document.getElementById("my_form").value = ""; | |
document.getElementById("text").value = ""; | |
document.getElementById("summary").value = ""; | |
} | |
</script> | |
<script> | |
function submitBothForms() | |
{ | |
document.getElementById("my_form").submit(); | |
document.getElementById("choixModel").submit(); | |
} | |
</script> | |
<script> | |
function getValue() { | |
var e = document.getElementById("choixModel"); | |
var value = e.value; | |
var text = e.options[e.selectedIndex].text; | |
return text} | |
</script> | |
<script type="text/javascript"> | |
document.getElementById('choixModel').value = "<?php echo $_GET['choixModel'];?>"; | |
</script> | |
</head> | |
<body> | |
<div id="header"> | |
<div class="inner"> | |
<header> | |
<h1>Text summarization API</h1> | |
<hr /> | |
</header> | |
</div> | |
<nav id="nav"> | |
<hr/> | |
</nav> | |
<div class="choixModel"> | |
<form id="choixModel" method="post" action="/model"> | |
<label for="selectModel">Choose a model :</label> | |
<select name="choixModel" class="selectModel" id="choixModel"> | |
<option value="lstm">LSTM</option> | |
<option value="fineTunedT5">Fine-tuned T5</option> | |
</select> | |
</form> | |
<button form ="choixModel" class='search_bn' type="submit" class="btn btn-primary btn-block btn-large" rows="1" cols="50">Select model</button> | |
</div> | |
<div> | |
<table> | |
<tr> | |
<td> | |
<form id = "my_form" action="/predict" method="post" class="formulaire"> | |
<textarea id="text" name="text" placeholder="Enter your text here!" rows="15" cols="75">{{text}}</textarea> | |
<input type="hidden" name="textarea_value" value="{{ text }}"> | |
</form> | |
</td> | |
<td> | |
<textarea id="summary" name="summary" rows="15" cols="75">{{summary}}</textarea> | |
</td> | |
</tr> | |
</table> | |
</div> | |
<div class="buttons"> | |
<!-- <button id="submit" type="submit" onclick=submitBothForms()>SUBMIT</button> --> | |
<button form ="my_form" class='search_bn' type="submit" class="btn btn-primary btn-block btn-large" rows="1" cols="50">Go !</button> | |
<button form ="my_form" type="button" value="Reset" onclick="customReset();">Reset</button> | |
</div> | |
<div class="copyright"> | |
<ul class="menu"> | |
<li>© Untitled. All rights reserved.</li> | |
</ul> | |
<ul> | |
<li>Projet mené dans le cadre des cours du master 2 TAL (Traitement Automatique des Langues)</li> | |
<li>Lingyun GAO -- Estelle SALMON -- Eve SAUVAGE</li> | |
</ul> | |
</div> | |
</div> | |
</body> | |
</html> | |