Falah Gatea
Jul 11, 2023

--

good tut. but u create an index,html in the templates folder with css style : (<!DOCTYPE html>

<html>

<head>

<title>Research Paper Summarizer</title>

</head>

<body>

<h1>Welcome to the Research Paper Summarizer</h1>

<form method="POST" action="/chat">

<input type="text" name="text" placeholder="Enter your research paper here">

<button type="submit">Summarize</button>

</form>

<div id="bot_output"></div>

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

<script>

$(document).ready(function() {

$('form').submit(function(event) {

event.preventDefault();

var userInput = $('input[name="text"]').val();

$.ajax({

type: 'POST',

url: '/chat',

data: { text: userInput },

success: function(data) {

$('#bot_output').text('Bot Output: ' + data.bot_output);

}

});

});

});

</script>

</body>

</html>

)

--

--

Falah Gatea
Falah Gatea

Written by Falah Gatea

Developer Programmer, in Python and deep learning. IOT Microcontroller Developer iraqprogrammer.wordpress.com

No responses yet