Spaces:
Sleeping
Sleeping
Commit History
-
fix: intermidiate lang to vn, strict change only term in step 6
c2c75ee
-
fix: reverse ai writer
b2bb2e6 -
feat: update prompt
0d138d2 -
feat: udpate allow polish ai
6504c4f -
fix: update default style
afe4a99 -
feat: update max token
e081a39 -
feat: fix default model
a0aa017 -
Add original-guided terminology refinement step
The standard pipeline now runs a fifth LLM pass after Step 4. It gives the model the original source and the Step 4 output, asks it to correct terminology using the source as reference, and explicitly preserves the Step 4 rewrite for non-terminology wording. Constraint: Step 5 must not broadly rewrite the already-humanized Step 4 text. Rejected: Fold terminology correction into Step 4 | translation engines do not have the original source and cannot reliably restore source terminology. Confidence: high Scope-risk: moderate Tested: pytest tests/test_llm_rewriter.py tests/test_pipeline.py; python3 -m py_compile src/standard/pipeline.py src/standard/llm_rewriter.py src/standard/__init__.py src/methodologies/translation_chain.py; pytest.0fb1497 -
Allow natural phrasing around preserved terminology
Terminology preservation should not make the rewrite literal. Clarify that strict handling applies only to specialized terms, while ordinary wording and surrounding phrasing should be translated and rewritten freely enough to sound natural and human in the destination language. Constraint: The humanizer must preserve facts and terminology without freezing non-terminology wording. Rejected: Remove fidelity guidance entirely | would risk mistranslating legal, financial, product, and technical terms. Confidence: high Scope-risk: narrow Tested: pytest tests/test_llm_rewriter.py; python3 -m py_compile src/standard/llm_rewriter.py; pytest.1db2d21 -
Preserve professional terminology during rewrite hops
Steps 1 and 2 both use llm_rewrite, so the terminology guidance now lives in a shared prompt builder used for the current request and history replay. The prompt tells the model to use established professional equivalents, preserve proper nouns and codes, keep formatting, and avoid adding or reinterpreting information before final review. Constraint: The standard pipeline reuses the same rewrite function for both LLM language hops. Rejected: Patch app.py only | the Step 1 and Step 2 prompts are constructed in src/standard/llm_rewriter.py. Confidence: high Scope-risk: narrow Tested: pytest tests/test_llm_rewriter.py; python3 -m py_compile src/standard/llm_rewriter.py app.py; pytest.b811e76
-
Default hosted rewriting to external NVIDIA NIM
The Space should not schedule local GPU work for text rewriting; all hosted LLM rewrite calls now default to NVIDIA NIM's OpenAI-compatible API and the Gradio UI no longer exposes alternate provider selection. FastAPI env fallback and example config use the same NVIDIA defaults. Constraint: NVIDIA NIM openai/gpt-oss-20b requires temperature <= 1.0. Constraint: Removing @spaces.GPU means the Space must run on non-ZeroGPU hardware. Rejected: Keep ZeroGPU decorator | it schedules HF GPU work even though inference happens through an external API. Confidence: high Scope-risk: narrow Tested: pytest; python3 -m py_compile app.py src/backend/app.py src/standard/llm_client.py; local Gradio launch smoke check on 127.0.0.1:7903.f67704d -
Run the Space through the FastAPI backend
The user wants the hosted app to behave like uvicorn src.backend.app:app instead of the Gradio wrapper. Replace the root Space launcher with a uvicorn entrypoint, keep a minimal ZeroGPU marker for the current hardware setting, and make the backend build runtime config from environment variables when config/config.toml is absent on the Space. Constraint: Hugging Face Gradio SDK runs the configured app_file, so app.py remains the live launcher Constraint: Current Space hardware is zero-a10g and CPU downgrade returned 402 Payment Required Rejected: Switch README to Docker SDK | Docker is the canonical FastAPI Space path, but ZeroGPU is Gradio-only and the current hardware cannot be downgraded from this token Confidence: high Scope-risk: moderate Directive: If hardware changes to CPU or paid GPU, prefer sdk: docker plus a root Dockerfile running uvicorn on port 7860 Tested: pytest Tested: python3 -m py_compile app.py src/backend/app.py src/standard/llm_client.py Tested: env PORT=8…6581bd5 -
Route hosted reasoning through NVIDIA NIM
The Space already used an OpenAI-compatible chat client, so NVIDIA support can stay inside the provider resolver instead of adding a separate API path. This adds the hosted NIM defaults for openai/gpt-oss-20b, reads NVIDIA_API_KEY, exposes the provider in the Gradio UI, and documents the required Space variables. Constraint: NVIDIA NIM exposes openai/gpt-oss-20b at https://integrate.api.nvidia.com/v1/chat/completions Constraint: NVIDIA documents temperature for this endpoint as 0.0 through 1.0 Rejected: Use generic openai provider plus LLM_BASE_URL only | works but hides provider-specific key/defaults from the UI and docs Confidence: high Scope-risk: narrow Directive: Keep provider additions in src.standard.llm_client unless the API stops being OpenAI-compatible Tested: pytest Tested: python3 -m py_compile app.py src/standard/llm_client.py Tested: env LLM_PROVIDER=nvidia NVIDIA_API_KEY=nvapi-test LLM_TEMPERATURE=1.0 config resolutionf335e22 -
Ship the Space update through Hub binary storage
The Hub rejected the previous revision because presentation PNGs were committed as raw Git blobs. Track PNG files through the existing LFS/Xet pointer workflow so Git Xet can upload the binary content while the Git commit stays lightweight. Constraint: Hugging Face rejects binary blobs in Git pushes and requires Xet-backed storage for these files Rejected: Remove the presentation images | the Space documentation references them and the remote accepts them when tracked as pointers Confidence: high Scope-risk: narrow Directive: Keep binary presentation assets covered by .gitattributes before committing new image updates Tested: git lfs ls-files shows all six PNG assets tracked Tested: git cat-file on a staged PNG shows a Git LFS pointer instead of raw PNG bytes Not-tested: Remote push after amending, pending next verification stepc0b1b71