Add PyTorch/ONNX prediction models with physics fallback
- Train 3 MLP networks (acid speed 14→1, tension 4→10, quality 6→2) on 12,000 synthetic samples generated from physics models + noise - Export pre-trained ONNX models to pt_models/ directory - Rewrite prediction.py: ONNX inference first, physics fallback if unavailable - Add onnxruntime + numpy to requirements.txt (Aliyun mirror for Docker) - Use Tsinghua mirror in Dockerfile for pip installs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
FROM python:3.12-slim
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
RUN pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
|
||||
COPY . .
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
||||
Reference in New Issue
Block a user