CoolFace
Apppublic

alvin-agustio/fintech-absa

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes
App README

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.py utama untuk workflow lokal

Isi penting

  • deploy/hf-space/hf_space_app.py: wrapper deploy untuk HF Spaces
  • deploy/hf-space/Dockerfile: image build untuk Space SDK Docker
  • deploy/hf-space/.dockerignore: jaga build context tetap kecil
  • scripts/export_hf_space_bundle.ps1: export bundle siap-push

Cara pakai

  1. 1.Jalankan:
powershell
   powershell -ExecutionPolicy Bypass -File .\scripts\export_hf_space_bundle.ps1
  1. 1.Script akan membuat folder:
text
   output/hf-space-bundle/
  1. 1.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.txt
  • src/ (termasuk src/dashboard/live.py untuk 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:

  1. 1.Mengambil ulasan dari Google Play Store untuk Kredivo dan Akulaku sesuai periode
  2. 2.Menjalankan preprocessing dan normalisasi yang sama dengan tahap Modify
  3. 3.Memberikan prediksi sentimen aspek dengan model retrained_epoch_15
  4. 4.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.