supli6669 commited on
Commit ·
d4db990
1
Parent(s): 6b5a120
fix: disable CORS and XsrfProtection on streamlit run command to resolve Axios 403 error on hugging face upload
Browse files- Dockerfile +2 -2
- handover.md +1 -1
Dockerfile
CHANGED
|
@@ -41,5 +41,5 @@ RUN python tools/download_weights.py
|
|
| 41 |
# Expose port 7860 for Hugging Face Spaces
|
| 42 |
EXPOSE 7860
|
| 43 |
|
| 44 |
-
# Run Streamlit on port 7860 in headless mode
|
| 45 |
-
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true", "--browser.gatherUsageStats=false"]
|
|
|
|
| 41 |
# Expose port 7860 for Hugging Face Spaces
|
| 42 |
EXPOSE 7860
|
| 43 |
|
| 44 |
+
# Run Streamlit on port 7860 in headless mode with CORS and XSRF disabled
|
| 45 |
+
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true", "--browser.gatherUsageStats=false", "--server.enableCORS=false", "--server.enableXsrfProtection=false"]
|
handover.md
CHANGED
|
@@ -469,7 +469,7 @@ face_helper.read_image(img)
|
|
| 469 |
### Code Changes (Applied)
|
| 470 |
- [MODIFY] [app.py](file:///d:/.gemini-scratch/custom-ai-enhancer/app.py) (Fixed bugs #1, #2, #3, #5 via queue IPC and None guards)
|
| 471 |
- [MODIFY] [pipeline.py](file:///d:/.gemini-scratch/custom-ai-enhancer/pipeline.py) (Fixed bug #4 — cached FaceRestoreHelper dynamically)
|
| 472 |
-
- [MODIFY] [Dockerfile](file:///d:/.gemini-scratch/custom-ai-enhancer/Dockerfile) (Added headless and
|
| 473 |
- [MODIFY] [requirements.txt](file:///d:/.gemini-scratch/custom-ai-enhancer/requirements.txt) (Cleaned up fake version numbers to resolve Hugging Face build failure)
|
| 474 |
- [MODIFY] [.github/workflows/hf_sync.yml](file:///d:/.gemini-scratch/custom-ai-enhancer/.github/workflows/hf_sync.yml) (Added token checks to output clear error on github action failure)
|
| 475 |
|
|
|
|
| 469 |
### Code Changes (Applied)
|
| 470 |
- [MODIFY] [app.py](file:///d:/.gemini-scratch/custom-ai-enhancer/app.py) (Fixed bugs #1, #2, #3, #5 via queue IPC and None guards)
|
| 471 |
- [MODIFY] [pipeline.py](file:///d:/.gemini-scratch/custom-ai-enhancer/pipeline.py) (Fixed bug #4 — cached FaceRestoreHelper dynamically)
|
| 472 |
+
- [MODIFY] [Dockerfile](file:///d:/.gemini-scratch/custom-ai-enhancer/Dockerfile) (Added headless, telemetry, and CORS/XSRF disable flags to streamlit run command)
|
| 473 |
- [MODIFY] [requirements.txt](file:///d:/.gemini-scratch/custom-ai-enhancer/requirements.txt) (Cleaned up fake version numbers to resolve Hugging Face build failure)
|
| 474 |
- [MODIFY] [.github/workflows/hf_sync.yml](file:///d:/.gemini-scratch/custom-ai-enhancer/.github/workflows/hf_sync.yml) (Added token checks to output clear error on github action failure)
|
| 475 |
|