Spaces:
Running
Running
medbillcodes-deploy commited on
Commit ·
1ddeb51
0
Parent(s):
Deploy cloud pilot API
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- Dockerfile +44 -0
- README.md +12 -0
- app/__init__.py +0 -0
- app/__pycache__/__init__.cpython-311.pyc +0 -0
- app/__pycache__/__init__.cpython-313.pyc +0 -0
- app/__pycache__/age_align.cpython-313.pyc +0 -0
- app/__pycache__/analytics.cpython-313.pyc +0 -0
- app/__pycache__/analyze_cache.cpython-313.pyc +0 -0
- app/__pycache__/audit_defense.cpython-313.pyc +0 -0
- app/__pycache__/clinic_workspace.cpython-313.pyc +0 -0
- app/__pycache__/config.cpython-311.pyc +0 -0
- app/__pycache__/config.cpython-313.pyc +0 -0
- app/__pycache__/datasource.cpython-313.pyc +0 -0
- app/__pycache__/deterministic_rank.cpython-313.pyc +0 -0
- app/__pycache__/duration_align.cpython-313.pyc +0 -0
- app/__pycache__/embed_experiment.cpython-313.pyc +0 -0
- app/__pycache__/embeddings.cpython-311.pyc +0 -0
- app/__pycache__/embeddings.cpython-313.pyc +0 -0
- app/__pycache__/encounter_align.cpython-313.pyc +0 -0
- app/__pycache__/eval_retrieval.cpython-311.pyc +0 -0
- app/__pycache__/eval_retrieval.cpython-313.pyc +0 -0
- app/__pycache__/family_scope.cpython-313.pyc +0 -0
- app/__pycache__/feedback.cpython-313.pyc +0 -0
- app/__pycache__/fsm_parser.cpython-313.pyc +0 -0
- app/__pycache__/ingestion.cpython-313.pyc +0 -0
- app/__pycache__/llm.cpython-313.pyc +0 -0
- app/__pycache__/main.cpython-313.pyc +0 -0
- app/__pycache__/mentor.cpython-313.pyc +0 -0
- app/__pycache__/ocr.cpython-313.pyc +0 -0
- app/__pycache__/ocr_worker.cpython-313.pyc +0 -0
- app/__pycache__/opensearch_client.cpython-313.pyc +0 -0
- app/__pycache__/paeds_retrieve.cpython-313.pyc +0 -0
- app/__pycache__/pilot_retrieve.cpython-313.pyc +0 -0
- app/__pycache__/province_registry.cpython-313.pyc +0 -0
- app/__pycache__/reconciliation.cpython-311.pyc +0 -0
- app/__pycache__/reconciliation.cpython-313.pyc +0 -0
- app/__pycache__/revenue_intel.cpython-313.pyc +0 -0
- app/__pycache__/schedule_docs.cpython-313.pyc +0 -0
- app/__pycache__/scheduler.cpython-313.pyc +0 -0
- app/__pycache__/schemas.cpython-313.pyc +0 -0
- app/__pycache__/search.cpython-313.pyc +0 -0
- app/__pycache__/search_aliases.cpython-313.pyc +0 -0
- app/__pycache__/sob_descriptions.cpython-313.pyc +0 -0
- app/__pycache__/sob_grounding.cpython-313.pyc +0 -0
- app/__pycache__/specialty_registry.cpython-313.pyc +0 -0
- app/__pycache__/specialty_scope.cpython-313.pyc +0 -0
- app/__pycache__/sqlite_store.cpython-313.pyc +0 -0
- app/__pycache__/staging_hybrid_eval.cpython-313.pyc +0 -0
- app/__pycache__/test_clinic_workspace.cpython-313-pytest-9.1.1.pyc +0 -0
- app/__pycache__/test_deterministic_rank.cpython-313-pytest-9.1.1.pyc +0 -0
Dockerfile
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Hugging Face Spaces — cloud pilot API (no laptop).
|
| 2 |
+
# OpenSearch = Aiven · LLM + embeddings = Featherless · no local torch.
|
| 3 |
+
#
|
| 4 |
+
# Space secrets / env (set in Space Settings → Variables):
|
| 5 |
+
# OPENSEARCH_URL, OPENSEARCH_USER, OPENSEARCH_ADMIN_PASSWORD
|
| 6 |
+
# OPENSEARCH_VERIFY_CERTS=true
|
| 7 |
+
# RETRIEVAL_BACKEND=opensearch
|
| 8 |
+
# PILOT_MODE=true
|
| 9 |
+
# VLLM_URL=https://api.featherless.ai/v1
|
| 10 |
+
# LLM_MODEL=m42-health/Llama3-Med42-8B
|
| 11 |
+
# LLM_API_KEY=<featherless>
|
| 12 |
+
# EMBEDDING_URL=https://api.featherless.ai
|
| 13 |
+
# EMBEDDING_MODEL=Qwen/Qwen3-Embedding-0.6B
|
| 14 |
+
# EMBEDDING_DIM=1024
|
| 15 |
+
# EMBEDDING_API_KEY=<featherless>
|
| 16 |
+
# DEID_NER=false
|
| 17 |
+
# REFRESH_ENABLED=false
|
| 18 |
+
FROM python:3.11-slim
|
| 19 |
+
|
| 20 |
+
ENV PYTHONUNBUFFERED=1 \
|
| 21 |
+
PIP_NO_CACHE_DIR=1 \
|
| 22 |
+
HF_HOME=/tmp/hf-cache \
|
| 23 |
+
TRANSFORMERS_CACHE=/tmp/hf-cache \
|
| 24 |
+
PILOT_MODE=true \
|
| 25 |
+
RETRIEVAL_BACKEND=opensearch \
|
| 26 |
+
OHIP_DATA_DIR=/tmp/ohip \
|
| 27 |
+
REFRESH_ENABLED=false \
|
| 28 |
+
DEID_NER=false \
|
| 29 |
+
PORT=7860
|
| 30 |
+
|
| 31 |
+
WORKDIR /app
|
| 32 |
+
|
| 33 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 34 |
+
ca-certificates \
|
| 35 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 36 |
+
|
| 37 |
+
COPY requirements-spaces.txt .
|
| 38 |
+
RUN pip install --upgrade pip && pip install -r requirements-spaces.txt
|
| 39 |
+
|
| 40 |
+
COPY app ./app
|
| 41 |
+
|
| 42 |
+
EXPOSE 7860
|
| 43 |
+
|
| 44 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Medbillcodes API
|
| 3 |
+
emoji: 🏥
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: gray
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
+
pinned: false
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
Cloud pilot FastAPI for medbillcodes.ca (Aiven OpenSearch + Featherless Med42).
|
| 12 |
+
Set secrets in Space Settings → Variables and secrets.
|
app/__init__.py
ADDED
|
File without changes
|
app/__pycache__/__init__.cpython-311.pyc
ADDED
|
Binary file (178 Bytes). View file
|
|
|
app/__pycache__/__init__.cpython-313.pyc
ADDED
|
Binary file (166 Bytes). View file
|
|
|
app/__pycache__/age_align.cpython-313.pyc
ADDED
|
Binary file (9.38 kB). View file
|
|
|
app/__pycache__/analytics.cpython-313.pyc
ADDED
|
Binary file (8.69 kB). View file
|
|
|
app/__pycache__/analyze_cache.cpython-313.pyc
ADDED
|
Binary file (3.98 kB). View file
|
|
|
app/__pycache__/audit_defense.cpython-313.pyc
ADDED
|
Binary file (10.8 kB). View file
|
|
|
app/__pycache__/clinic_workspace.cpython-313.pyc
ADDED
|
Binary file (19.6 kB). View file
|
|
|
app/__pycache__/config.cpython-311.pyc
ADDED
|
Binary file (4.69 kB). View file
|
|
|
app/__pycache__/config.cpython-313.pyc
ADDED
|
Binary file (4.34 kB). View file
|
|
|
app/__pycache__/datasource.cpython-313.pyc
ADDED
|
Binary file (8.66 kB). View file
|
|
|
app/__pycache__/deterministic_rank.cpython-313.pyc
ADDED
|
Binary file (30.5 kB). View file
|
|
|
app/__pycache__/duration_align.cpython-313.pyc
ADDED
|
Binary file (10.4 kB). View file
|
|
|
app/__pycache__/embed_experiment.cpython-313.pyc
ADDED
|
Binary file (26.8 kB). View file
|
|
|
app/__pycache__/embeddings.cpython-311.pyc
ADDED
|
Binary file (2.43 kB). View file
|
|
|
app/__pycache__/embeddings.cpython-313.pyc
ADDED
|
Binary file (6.52 kB). View file
|
|
|
app/__pycache__/encounter_align.cpython-313.pyc
ADDED
|
Binary file (6.72 kB). View file
|
|
|
app/__pycache__/eval_retrieval.cpython-311.pyc
ADDED
|
Binary file (14.5 kB). View file
|
|
|
app/__pycache__/eval_retrieval.cpython-313.pyc
ADDED
|
Binary file (17.8 kB). View file
|
|
|
app/__pycache__/family_scope.cpython-313.pyc
ADDED
|
Binary file (9.71 kB). View file
|
|
|
app/__pycache__/feedback.cpython-313.pyc
ADDED
|
Binary file (13.8 kB). View file
|
|
|
app/__pycache__/fsm_parser.cpython-313.pyc
ADDED
|
Binary file (5.33 kB). View file
|
|
|
app/__pycache__/ingestion.cpython-313.pyc
ADDED
|
Binary file (5.13 kB). View file
|
|
|
app/__pycache__/llm.cpython-313.pyc
ADDED
|
Binary file (21 kB). View file
|
|
|
app/__pycache__/main.cpython-313.pyc
ADDED
|
Binary file (6.7 kB). View file
|
|
|
app/__pycache__/mentor.cpython-313.pyc
ADDED
|
Binary file (10.2 kB). View file
|
|
|
app/__pycache__/ocr.cpython-313.pyc
ADDED
|
Binary file (5.59 kB). View file
|
|
|
app/__pycache__/ocr_worker.cpython-313.pyc
ADDED
|
Binary file (3.22 kB). View file
|
|
|
app/__pycache__/opensearch_client.cpython-313.pyc
ADDED
|
Binary file (6.36 kB). View file
|
|
|
app/__pycache__/paeds_retrieve.cpython-313.pyc
ADDED
|
Binary file (16.5 kB). View file
|
|
|
app/__pycache__/pilot_retrieve.cpython-313.pyc
ADDED
|
Binary file (6.37 kB). View file
|
|
|
app/__pycache__/province_registry.cpython-313.pyc
ADDED
|
Binary file (6.53 kB). View file
|
|
|
app/__pycache__/reconciliation.cpython-311.pyc
ADDED
|
Binary file (14.8 kB). View file
|
|
|
app/__pycache__/reconciliation.cpython-313.pyc
ADDED
|
Binary file (13.8 kB). View file
|
|
|
app/__pycache__/revenue_intel.cpython-313.pyc
ADDED
|
Binary file (12.8 kB). View file
|
|
|
app/__pycache__/schedule_docs.cpython-313.pyc
ADDED
|
Binary file (6.28 kB). View file
|
|
|
app/__pycache__/scheduler.cpython-313.pyc
ADDED
|
Binary file (2.73 kB). View file
|
|
|
app/__pycache__/schemas.cpython-313.pyc
ADDED
|
Binary file (15.4 kB). View file
|
|
|
app/__pycache__/search.cpython-313.pyc
ADDED
|
Binary file (6.39 kB). View file
|
|
|
app/__pycache__/search_aliases.cpython-313.pyc
ADDED
|
Binary file (6.65 kB). View file
|
|
|
app/__pycache__/sob_descriptions.cpython-313.pyc
ADDED
|
Binary file (25.9 kB). View file
|
|
|
app/__pycache__/sob_grounding.cpython-313.pyc
ADDED
|
Binary file (3.76 kB). View file
|
|
|
app/__pycache__/specialty_registry.cpython-313.pyc
ADDED
|
Binary file (6.68 kB). View file
|
|
|
app/__pycache__/specialty_scope.cpython-313.pyc
ADDED
|
Binary file (11.3 kB). View file
|
|
|
app/__pycache__/sqlite_store.cpython-313.pyc
ADDED
|
Binary file (11.3 kB). View file
|
|
|
app/__pycache__/staging_hybrid_eval.cpython-313.pyc
ADDED
|
Binary file (14.3 kB). View file
|
|
|
app/__pycache__/test_clinic_workspace.cpython-313-pytest-9.1.1.pyc
ADDED
|
Binary file (7.29 kB). View file
|
|
|
app/__pycache__/test_deterministic_rank.cpython-313-pytest-9.1.1.pyc
ADDED
|
Binary file (16 kB). View file
|
|
|