From 32b1570085b2aab6506953c86a0354e124023456 Mon Sep 17 00:00:00 2001 From: whats2000 Date: Wed, 21 Jan 2026 15:16:21 +0800 Subject: [PATCH 1/4] Add: Add space docker config --- .dockerignore | 14 ++++++++++++++ .github/workflows/huggingface.yml | 21 +++++++++++++++++++++ Dockerfile | 21 +++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .dockerignore create mode 100644 .github/workflows/huggingface.yml create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3cdc556 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +__pycache__ +*.pyc +*.pyo +*.pyd +.Python +env/ +venv/ +.env +.venv +env.bak/ +venv.bak/ +.git +.gitignore +.github diff --git a/.github/workflows/huggingface.yml b/.github/workflows/huggingface.yml new file mode 100644 index 0000000..8414012 --- /dev/null +++ b/.github/workflows/huggingface.yml @@ -0,0 +1,21 @@ +name: Sync to Hugging Face hub +on: + push: + branches: [main] + + # to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + sync-to-hub: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + lfs: true + - name: Push to hub + env: + HF_TOKEN: ${{ secrets.HF_TOKEN }} + run: | + git push --force https://oauth2:$HF_TOKEN@huggingface.co/spaces/whats2000/tw-eval-analyzer main diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d927629 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM python:3.13.5-slim + +WORKDIR /app + +RUN apt-get update && apt-get install -y \ + build-essential \ + curl \ + git \ + && rm -rf /var/lib/apt/lists/* + +COPY requirements.txt ./ +COPY . . + +RUN pip3 install -r requirements.txt + +# Hugging Face Spaces requires port 7860 +EXPOSE 7860 + +HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health + +ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] From 01a71c056cd0b3d8ee3810ed4f486d68b2526d95 Mon Sep 17 00:00:00 2001 From: whats2000 Date: Wed, 21 Jan 2026 15:19:14 +0800 Subject: [PATCH 2/4] Add: Add missing README config --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index c4d84eb..080f3c8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ +--- +title: Twinkle Eval Analyzer +emoji: ✨ +colorFrom: blue +colorTo: indigo +sdk: docker +app_file: app.py +pinned: false +--- + # 🌟 Eval Analyzer 一個基於 🎈 **Streamlit** 的互動式工具,用來分析 **[Twinkle Eval](https://github.com/ai-twinkle/Eval)** 格式的評估檔案(`.json` / `.jsonl`)。 From dd93e4745cef9313135d4a46aad09aad6a35b504 Mon Sep 17 00:00:00 2001 From: whats2000 Date: Wed, 21 Jan 2026 15:21:38 +0800 Subject: [PATCH 3/4] Feat: Set to organization space after test --- .github/workflows/huggingface.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/huggingface.yml b/.github/workflows/huggingface.yml index 8414012..e543252 100644 --- a/.github/workflows/huggingface.yml +++ b/.github/workflows/huggingface.yml @@ -18,4 +18,4 @@ jobs: env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | - git push --force https://oauth2:$HF_TOKEN@huggingface.co/spaces/whats2000/tw-eval-analyzer main + git push --force https://oauth2:$HF_TOKEN@huggingface.co/spaces/twinkle-ai/tw-eval-analyzer main From 21f49ce93390a3b49c9ff837eb5477345ae82af3 Mon Sep 17 00:00:00 2001 From: whats2000 <60466660+whats2000@users.noreply.github.com> Date: Wed, 21 Jan 2026 15:45:54 +0800 Subject: [PATCH 4/4] Update .github/workflows/huggingface.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/huggingface.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/huggingface.yml b/.github/workflows/huggingface.yml index e543252..b2948fc 100644 --- a/.github/workflows/huggingface.yml +++ b/.github/workflows/huggingface.yml @@ -10,7 +10,7 @@ jobs: sync-to-hub: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true