0% found this document useful (0 votes)
35 views1 page

Idk HTML

Uploaded by

shriyaroxy1910
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views1 page

Idk HTML

Uploaded by

shriyaroxy1910
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<!

DOCTYPE html>
<html>
<head>
<title>AI Note Taker</title>
</head>
<body>
<h1>AI Note Taker</h1>

<input type="file" id="fileInput">


<button onclick="processFile()">Process File</button>

<div id="output"></div>

<script>
function processFile() {
const fileInput = document.getElementById('fileInput');
const file = fileInput.files[0];

if (file) {
const reader = new FileReader();

reader.onload = function(e) {
const text = e.target.result;

// Send the text to an AI note-taking service


fetch('https://api.example.com/take_notes', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ text: text })
})
.then(response => response.json())
.then(data => {
// Display the notes in the output div
const outputDiv = document.getElementById('output');
outputDiv.innerHTML = data.notes;
});
};

reader.readAsText(file);
}
}
</script>

</body>
</html>

You might also like