File size: 906 Bytes
319480f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
services:
  - type: web
    name: dialingua-api
    runtime: python
    plan: free
    region: frankfurt
    buildCommand: pip install -r requirements.txt
    # Single worker. The free tier has 512 MB and 0.1 CPU; a second worker
    # would load a second copy of the model and OOM immediately.
    startCommand: uvicorn app:app --host 0.0.0.0 --port $PORT --workers 1
    healthCheckPath: /health
    envVars:
      - key: PYTHON_VERSION
        value: "3.11"
      - key: BKV_MODEL
        value: Lordkiki/dialingua-bkv2eng-web
      # Cache the model on the persistent-ish disk between restarts so a cold
      # start is not also a 233 MB download.
      - key: HF_HOME
        value: /opt/render/project/.cache/huggingface
      # Set this to your site's domain once it has one. "*" is fine for a
      # public read-only API but lets any page call it.
      - key: ALLOWED_ORIGINS
        value: "*"