alvin-agustio/fintech-absa
0
Hugging Face Spaces Deploy Pack
Paket ini buat mode deploy ke Hugging Face Space dengan fokus fitur live fetch:
- tampilkan halaman utama (Page 1: Executive ABSA)
- live fetch ulasan dari Google Play Store untuk Kredivo dan Akulaku
- inference hanya pakai
retrained_epoch_15(model final dari Bab 4.5) - hasil cached scope tetap bisa dibaca jika bundle menyertakan
data/processed/dashboard - tidak ubah perilaku
app.pyutama untuk workflow lokal
Isi penting
deploy/hf-space/hf_space_app.py: wrapper deploy untuk HF Spacesdeploy/hf-space/Dockerfile: image build untuk Space SDKDockerdeploy/hf-space/.dockerignore: jaga build context tetap kecilscripts/export_hf_space_bundle.ps1: export bundle siap-push
Cara pakai
- Jalankan:
powershell -ExecutionPolicy Bypass -File .\scripts\export_hf_space_bundle.ps1- Script akan membuat folder:
output/hf-space-bundle/- Push isi folder itu ke repo Hugging Face Space yang sudah dibuat dengan SDK
Docker.
Bundle hasil export
Bundle akan berisi:
app.py,config.py,requirements.txtsrc/(termasuksrc/dashboard/live.pyuntuk live fetch)deploy/hf-space/data/processed/dashboard/(cached scope, opsional)data/processed/evaluation/data/processed/diamond/models/retrained/epoch_15/
Live Fetch
Live fetch memakai library google-play-scraper yang public dan tidak butuh API key. Setiap fetch akan:
- Mengambil ulasan dari Google Play Store untuk Kredivo dan Akulaku sesuai periode
- Menjalankan preprocessing dan normalisasi yang sama dengan tahap Modify
- Memberikan prediksi sentimen aspek dengan model
retrained_epoch_15 - Menyimpan hasil ke cache lokal Space (DuckDB) untuk akses berikutnya
Catatan
- Disarankan batasi jumlah review yang di-fetch agar tetap nyaman di free tier (RAM 16 GB).
- Model deploy default:
retrained_epoch_15(Retrained Baseline). - Cached scope di bundle berfungsi sebagai contoh awal yang langsung bisa dibaca tanpa perlu fetch baru.
