Commit f6ef6c08 authored by Udara Rangika's avatar Udara Rangika

front page created

parent c3c6dffe
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Proficiency Level Identification</title>
</head>
<body>
<h1>Proficiency Level Identification</h1>
<textarea id="inputData" placeholder="Enter JSON data here" rows="15" cols="40"></textarea>
<div>
<button onclick="makeRequest()">Send Request</button>
</div>
<h2>Response:</h2>
<pre id="response"></pre>
<script>
function makeRequest() {
var inputData = document.getElementById("inputData").value;
// Replace this URL with your Flask API endpoint
var apiUrl = "http://127.0.0.1:5000/predict_proficiency";
fetch(apiUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: inputData
})
.then(response => response.json())
.then(data => {
document.getElementById("response").innerText = JSON.stringify(data, null, 2);
})
.catch(error => {
document.getElementById("response").innerText = "Error: " + error.message;
});
}
</script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment