<!
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>