diff --git a/dsRag/Milvus/X3_SplitTxt.py b/dsRag/Milvus/X3_SplitTxt.py index 2eefd912..4440c0cd 100644 --- a/dsRag/Milvus/X3_SplitTxt.py +++ b/dsRag/Milvus/X3_SplitTxt.py @@ -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) diff --git a/dsRag/Txt/小学数学(史校长).docx b/dsRag/static/Txt/小学数学(史校长).docx similarity index 100% rename from dsRag/Txt/小学数学(史校长).docx rename to dsRag/static/Txt/小学数学(史校长).docx diff --git a/dsRag/static/ai.html b/dsRag/static/ai.html index 1bdf7990..b265d147 100644 --- a/dsRag/static/ai.html +++ b/dsRag/static/ai.html @@ -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 @@ + @@ -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();