Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
__pycache__
*.pyc
*.pyo
*.pyd
.Python
env/
venv/
.env
.venv
env.bak/
venv.bak/
.git
.gitignore
.github
21 changes: 21 additions & 0 deletions .github/workflows/huggingface.yml
Original file line number Diff line number Diff line change
@@ -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@v4
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/twinkle-ai/tw-eval-analyzer main
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Comment on lines +12 to +15
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order of COPY operations is inefficient for Docker layer caching. Currently, requirements.txt is copied first but then the entire directory (including requirements.txt again) is copied immediately after. This negates the benefit of separate layer caching. Consider restructuring to copy requirements.txt, run pip install, and then copy the rest of the application files. This way, the dependencies layer will only rebuild when requirements.txt changes, not when any application file changes.

Suggested change
COPY . .
RUN pip3 install -r requirements.txt
RUN pip3 install -r requirements.txt
COPY . .

Copilot uses AI. Check for mistakes.
# 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"]
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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`)。
Expand Down