Spaces:
Sleeping
Sleeping
Commit History
-
Add per-step form validation; allow language-only filter; drop "mockup" wording
malteosUnverified signatureValidation (shown inline on Next/Estimate click, blocking forward navigation): - Filter guided: at least one of registered domains / exact hostnames / content languages. Each is now labelled "(optional)" with a group note; a language-only filter is allowed (previously blocked by validate_targets and the SQL builder). - Filter advanced: SQL WHERE must be non-empty. - Crawls: at least one crawl selected. - Output: path and WARC name must be non-empty (syncForm no longer silently defaults an empty name to "repackaged", which had hidden the check). Errors clear as the user edits; the Estimate button jumps to the first invalid step. Backend: buckets.validate_targets accepts languages (language-only valid), and index_query._build_sql builds a language-only WHERE (no host/domain predicate). Also: removed the "mockup" mention from the Output guest gate. Tests: language-only in validate_targets and index_query; suite green (56).fdce60b
-
Show the example's real bucket/path in the tutorial review Output
malteosUnverified signatureIn tutorial (demo) mode the review "Output" line showed "/exports/run1/..." with no bucket, because the guest bucket input is empty and syncForm overwrote the demo's state on every navigation. Now: - the example JSON exposes its hosted bucket + path; - runDemo sets state.bucket/state.path to the example's real location; - syncForm is a no-op in demo mode (fields are fixed by the example); - the review falls back to "<your bucket>" when no bucket is set (guest, non-demo). The tutorial Output now reads e.g. malteos/cc-repackage-examples/wikipedia-fr/ wikipedia-fr-*.warc.gz.5f0f1c6 -
Deploy the wizard UI as a Docker Space (sdk: docker + HF OAuth)
malteosUnverified signature- Dockerfile: small python:3.12-slim image running uvicorn on 7860 (only the web shell + huggingface_hub; jobs install their own duckdb/cdxt). --proxy-headers for the HF Spaces proxy. .dockerignore keeps .venv/tests out of the build context. - README: switch frontmatter to sdk: docker + app_port: 7860 (drop gradio sdk_version / app_file); keep hf_oauth + write-repos/jobs scopes. - OAuth hardened for the Space: build the callback from SPACE_HOST, request openid+profile alongside the app scopes, RedirectResponse home after login, https-only session cookie. - Fix: token_for/user_for must not touch request.session when SessionMiddleware is absent (guest hfjobs mode) — check request.scope for "session" instead. Without this /api/* 500'd on the Space. Caught by building + running the image locally. Verified locally (podman build + run): serves the wizard in hfjobs guest mode (/api/config, static assets 200) and /login 302s to huggingface.co/oauth/authorize with the correct cli…a9e3534 -
Add FastAPI wizard UI (custom frontend) alongside the Gradio app
malteosUnverified signatureA guided, step-by-step web UI to replace the single-screen Gradio form. It's a thin HTTP+SSE shell over the existing src/ modules — no job logic is duplicated. - server/main.py — FastAPI app: static wizard at /, JSON at /api/*, live job log streaming over SSE (/api/jobs/{id}/events, /api/examples/{key}/events?phase=). Reuses src.job_runner (real HF Jobs or local podman), src.jobs, src.buckets, src.estimate, src.examples. HF OAuth wired via authlib only when the Space injects OAUTH_CLIENT_ID; locally it runs as guest (like Gradio's IS_PODMAN). - server/static/ — the approved Common Crawl-styled wizard (CC fonts/logo/palette, cc-examples footer). Six steps: Start (sign-in + precomputed examples) -> Filter (guided fields incl. quick-pick + searchable all-119-languages select, or raw SQL) -> Crawls -> Output -> Estimate (streamed logs + cost tiles) -> Run (progress + result with download link). Header logo/title link home. - Demo examples run as a guided tutorial: a banner…051cf03