main
HuangHai 4 weeks ago
parent 0ddbd75e1e
commit aeb8670ddd

@ -62,6 +62,6 @@ def save_to_txt(content, file_path, mode='w'):
return False
if __name__ == "__main__":
input_file = '../Txt/小学数学(史校长).docx'
input_file = '../static/Txt/小学数学(史校长).docx'
output_dir = '../Txt/processed_chunks'
process_document(input_file, output_dir)

@ -76,7 +76,7 @@
}
#clearBtn {
background-color: #6c757d;
background-color: #f44336;
color: white;
border: none;
padding: 10px 20px;
@ -85,9 +85,21 @@
cursor: pointer;
transition: background-color 0.3s;
}
#clearBtn:hover {
background-color: #5a6268;
background-color: #d32f2f;
}
#downloadBtn {
background-color: #4CAF50;
color: white;
border: none;
padding: 10px 20px;
font-size: 16px;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
#downloadBtn:hover {
background-color: #45a049;
}
.status {
@ -150,6 +162,7 @@
<input type="text" id="questionInput" placeholder="请输入您的问题,例如:小学数学的学习方法">
<button id="submitBtn" onclick="submitQuestion()">提问</button>
<button id="clearBtn" onclick="clearAll()">清空</button>
<button id="downloadBtn" onclick="downloadDocument()">下载教材</button>
</div>
</div>
@ -163,6 +176,10 @@
document.getElementById('status').textContent = '准备就绪';
document.getElementById('status').className = 'status';
}
function downloadDocument() {
window.location.href = '/static/Txt/小学数学(史校长).docx';
}
function submitQuestion() {
const question = document.getElementById('questionInput').value.trim();

Loading…
Cancel
Save