Update app.py
Browse files
app.py
CHANGED
|
@@ -440,9 +440,9 @@ def create_interface():
|
|
| 440 |
|
| 441 |
gr.HTML("""
|
| 442 |
<div style="padding: 20px;">
|
| 443 |
-
<h2>🧾 Vietnamese Receipt Classification System</h2>
|
| 444 |
|
| 445 |
-
<div
|
| 446 |
<h3>🎯 Tính năng chính</h3>
|
| 447 |
<ul>
|
| 448 |
<li><strong>🤖 AI Vision:</strong> Trích xuất mô tả từ ảnh hóa đơn bằng Google Gemini Vision API</li>
|
|
@@ -453,20 +453,20 @@ def create_interface():
|
|
| 453 |
</ul>
|
| 454 |
</div>
|
| 455 |
|
| 456 |
-
<div
|
| 457 |
<h3>🔧 Công nghệ sử dụng</h3>
|
| 458 |
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px;">
|
| 459 |
<div>
|
| 460 |
-
<h4>Machine Learning:</h4>
|
| 461 |
-
<ul>
|
| 462 |
<li>scikit-learn</li>
|
| 463 |
<li>sentence-transformers</li>
|
| 464 |
<li>DEAP (Genetic Algorithm)</li>
|
| 465 |
</ul>
|
| 466 |
</div>
|
| 467 |
<div>
|
| 468 |
-
<h4>AI Vision:</h4>
|
| 469 |
-
<ul>
|
| 470 |
<li>Google Gemini Vision</li>
|
| 471 |
<li>PIL (Image Processing)</li>
|
| 472 |
<li>Gradio Interface</li>
|
|
@@ -475,9 +475,9 @@ def create_interface():
|
|
| 475 |
</div>
|
| 476 |
</div>
|
| 477 |
|
| 478 |
-
<div
|
| 479 |
<h3>🚀 Hướng dẫn sử dụng</h3>
|
| 480 |
-
<ol>
|
| 481 |
<li><strong>Training:</strong> Bắt đầu với tab "🚀 Model Training", click "Start Training" và đợi 10-15 phút</li>
|
| 482 |
<li><strong>Classification:</strong> Chuyển sang tab "🔮 Bill Classification"</li>
|
| 483 |
<li><strong>Upload ảnh:</strong> Kéo thả ảnh hóa đơn vào khung "Upload ảnh hóa đơn"</li>
|
|
@@ -488,9 +488,9 @@ def create_interface():
|
|
| 488 |
</ol>
|
| 489 |
</div>
|
| 490 |
|
| 491 |
-
<div
|
| 492 |
<h3>⚠️ Lưu ý quan trọng</h3>
|
| 493 |
-
<ul>
|
| 494 |
<li><strong>Google AI API:</strong> Để sử dụng tính năng trích xuất từ ảnh, cần thiết lập GOOGLE_AI_API_KEY trong environment variables</li>
|
| 495 |
<li><strong>Dataset:</strong> App cần file viet_receipt_categorized_label.xlsx để training</li>
|
| 496 |
<li><strong>Memory:</strong> Training có thể tốn nhiều RAM, nên dùng trên máy có đủ bộ nhớ</li>
|
|
@@ -498,7 +498,7 @@ def create_interface():
|
|
| 498 |
</ul>
|
| 499 |
</div>
|
| 500 |
|
| 501 |
-
<div style="text-align: center; margin-top: 30px; padding: 20px; background: linear-gradient(45deg, #
|
| 502 |
<h3>🎉 Developed with ❤️ for Vietnamese NLP Community</h3>
|
| 503 |
<p>Powered by Hugging Face 🤗 | Google AI Studio | Gradio</p>
|
| 504 |
</div>
|
|
|
|
| 440 |
|
| 441 |
gr.HTML("""
|
| 442 |
<div style="padding: 20px;">
|
| 443 |
+
<h2 style="color: #2c3e50;">🧾 Vietnamese Receipt Classification System</h2>
|
| 444 |
|
| 445 |
+
<div class="info-section">
|
| 446 |
<h3>🎯 Tính năng chính</h3>
|
| 447 |
<ul>
|
| 448 |
<li><strong>🤖 AI Vision:</strong> Trích xuất mô tả từ ảnh hóa đơn bằng Google Gemini Vision API</li>
|
|
|
|
| 453 |
</ul>
|
| 454 |
</div>
|
| 455 |
|
| 456 |
+
<div class="example-section">
|
| 457 |
<h3>🔧 Công nghệ sử dụng</h3>
|
| 458 |
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px;">
|
| 459 |
<div>
|
| 460 |
+
<h4 style="color: #0d47a1;">Machine Learning:</h4>
|
| 461 |
+
<ul style="color: #1565c0;">
|
| 462 |
<li>scikit-learn</li>
|
| 463 |
<li>sentence-transformers</li>
|
| 464 |
<li>DEAP (Genetic Algorithm)</li>
|
| 465 |
</ul>
|
| 466 |
</div>
|
| 467 |
<div>
|
| 468 |
+
<h4 style="color: #0d47a1;">AI Vision:</h4>
|
| 469 |
+
<ul style="color: #1565c0;">
|
| 470 |
<li>Google Gemini Vision</li>
|
| 471 |
<li>PIL (Image Processing)</li>
|
| 472 |
<li>Gradio Interface</li>
|
|
|
|
| 475 |
</div>
|
| 476 |
</div>
|
| 477 |
|
| 478 |
+
<div class="success-section">
|
| 479 |
<h3>🚀 Hướng dẫn sử dụng</h3>
|
| 480 |
+
<ol style="color: #155724;">
|
| 481 |
<li><strong>Training:</strong> Bắt đầu với tab "🚀 Model Training", click "Start Training" và đợi 10-15 phút</li>
|
| 482 |
<li><strong>Classification:</strong> Chuyển sang tab "🔮 Bill Classification"</li>
|
| 483 |
<li><strong>Upload ảnh:</strong> Kéo thả ảnh hóa đơn vào khung "Upload ảnh hóa đơn"</li>
|
|
|
|
| 488 |
</ol>
|
| 489 |
</div>
|
| 490 |
|
| 491 |
+
<div class="warning-section">
|
| 492 |
<h3>⚠️ Lưu ý quan trọng</h3>
|
| 493 |
+
<ul style="color: #856404;">
|
| 494 |
<li><strong>Google AI API:</strong> Để sử dụng tính năng trích xuất từ ảnh, cần thiết lập GOOGLE_AI_API_KEY trong environment variables</li>
|
| 495 |
<li><strong>Dataset:</strong> App cần file viet_receipt_categorized_label.xlsx để training</li>
|
| 496 |
<li><strong>Memory:</strong> Training có thể tốn nhiều RAM, nên dùng trên máy có đủ bộ nhớ</li>
|
|
|
|
| 498 |
</ul>
|
| 499 |
</div>
|
| 500 |
|
| 501 |
+
<div style="text-align: center; margin-top: 30px; padding: 20px; background: linear-gradient(45deg, #2c3e50, #3498db); color: white; border-radius: 8px;">
|
| 502 |
<h3>🎉 Developed with ❤️ for Vietnamese NLP Community</h3>
|
| 503 |
<p>Powered by Hugging Face 🤗 | Google AI Studio | Gradio</p>
|
| 504 |
</div>
|