Spaces:
Runtime error
Runtime error
|
Download README.md from BNAmericas/ComparerTool: direct link, hf CLI and curl.
- Browser
- Download file 4.49 kB
-
https://huggingface.co/spaces/BNAmericas/ComparerTool/resolve/main/README.md
- Command line
-
hf download hf://spaces/BNAmericas/ComparerTool/README.md
-
curl -L -o README.md https://huggingface.co/spaces/BNAmericas/ComparerTool/resolve/main/README.md
4.49 kB
| title: BNA Comparator | |
| emoji: π§ | |
| colorFrom: indigo | |
| colorTo: purple | |
| sdk: docker | |
| pinned: false | |
| short_description: Compare Agentic-AI Excels against BNAmericas projects. | |
| # BNA Comparator β Web Edition | |
| URL-based replacement for the desktop batch app. Researchers visit the URL, upload AI Excels, sign into BNA, hit Run, download results. Same engine as the desktop app β no install required. | |
| ## What you (the developer) own | |
| - This folder is a Hugging Face Spaces repo. | |
| - When you push code to the `main` branch, Hugging Face rebuilds the Docker image and rolls out the new version automatically. Researchers see the change on their next page refresh. | |
| - The Space is **free forever** on HF's CPU tier. There is no monthly bill. | |
| ## One-time deploy steps (10β15 minutes, no IT) | |
| 1. Go to <https://huggingface.co/new-space>. | |
| 2. Owner: your personal HF account (or create an org for `bnamericas` β free). | |
| 3. Space name: `bna-comparator`. | |
| 4. SDK: **Docker**. | |
| 5. Visibility: **Public** if cost is paramount; **Private** if you have HF Pro ($9/mo). | |
| 6. Create the Space. HF gives you a git URL like `https://huggingface.co/spaces/<owner>/bna-comparator`. | |
| 7. From your laptop: | |
| ```bash | |
| cd BNA_Comparator_Web | |
| git init | |
| git add . | |
| git commit -m "Initial deploy" | |
| git remote add space https://huggingface.co/spaces/<owner>/bna-comparator | |
| git push space main | |
| ``` | |
| 8. Hugging Face builds the Docker image (~5 minutes the first time, ~1 minute on subsequent pushes). When it finishes, the URL is live. | |
| ## How researchers use it | |
| 1. Open `https://huggingface.co/spaces/<owner>/bna-comparator` (or the iframe URL `https://<owner>-bna-comparator.hf.space`). | |
| 2. (Optional) Enter the team password if you set `BNA_WEB_PASSWORD` in the Space's Settings β Variables and secrets. | |
| 3. Drag a ZIP of AI Excels (or multiple `.xlsx` files) into the uploader. | |
| 4. Pick output language. | |
| 5. Enter BNA email and password (used per session, never stored). | |
| 6. Click **βΆ Run batch**. | |
| 7. Watch the live log; when done, click **β¬ Download results ZIP**. | |
| ## Auto-update mechanism | |
| Every time you push to the Space's `main` branch: | |
| - HF rebuilds the Docker image. | |
| - The Space restarts in ~30 seconds. | |
| - The next researcher visit serves the new version. | |
| No SharePoint upload, no email blast. You ship a fix β it's live before lunch. | |
| ## What's in this repo | |
| ``` | |
| BNA_Comparator_Web/ | |
| βββ app.py Streamlit UI + run orchestration | |
| βββ Dockerfile Python 3.12 + Playwright Chromium | |
| βββ requirements.txt Streamlit, openpyxl, playwright, psutil | |
| βββ README.md This file (also the HF Space description) | |
| βββ resources/ | |
| β βββ TIE_Requirements.xlsx | |
| βββ engine/ Same code as the desktop app | |
| βββ batch_runner.py | |
| βββ rules.py | |
| βββ scraper.py | |
| βββ transformer.py | |
| βββ comparator.py | |
| βββ insights.py | |
| βββ tie_loader.py | |
| βββ currency.py | |
| βββ i18n.py | |
| βββ translator.py | |
| ``` | |
| The `engine/` modules are unmodified from the desktop app. The Streamlit wrapper calls `batch_runner.run_batch()` the same way the desktop GUI does. | |
| ## Updating TIE rules | |
| Edit `resources/TIE_Requirements.xlsx` in Excel. Commit. Push. The new rules are live on the URL in ~1 minute. Same workflow as the desktop app, except a single source of truth instead of one workbook per laptop. | |
| ## Cost | |
| - Hugging Face Spaces (CPU Basic): **$0/month forever** | |
| - GitHub (for source backups): **$0/month** | |
| - Your time after initial setup: **~0 hours/month** | |
| ## When you (or BNA) want it private | |
| Two cheap options: | |
| - **HF Pro account** ($9/mo) gives you private Spaces. URL is still public but auth is enforced by HF. | |
| - **Public Space + team password** (no cost). Set `BNA_WEB_PASSWORD` in HF Spaces secrets. The first page is a password prompt; researchers enter the shared password once per browser session. | |
| ## Known limitations | |
| - The HF free CPU tier has 16 GB RAM and 2 vCPUs β plenty for batches up to ~25 projects. Beyond that the run will still complete but take longer. | |
| - The Space sleeps after ~48 hours of zero traffic. The first visit after a sleep takes ~90 seconds to wake. Daily-use teams never see this. | |
| - Manual BNA login (visible interactive browser on the server) is on the roadmap. v1 supports email/password auto-login with the same stealth flags as the desktop app, which works for most BNAmericas accounts. | |