File size: 573 Bytes
c2d58b3
f632edb
c2d58b3
 
2468ba3
f632edb
e26f64e
 
 
 
 
 
 
 
 
 
2468ba3
e26f64e
c2d58b3
f632edb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from pydantic import BaseSettings
from typing import Dict

class Settings(BaseSettings):
    # A dictionary to map shipper_id to the appropriate model
    model_map: Dict[int, str] = {
        61: "donut-v16",
        81: "donut-v16",
        139: "donut-v16",
        165: "donut-v17",
        145: "donut-v17",
        127: "donut-v17",
    }
    space_base: str = "senga-ml"

    def get_model_url(self, shipper_id: int) -> str:
        model = self.model_map.get(shipper_id, "default-model")  
        return f"https://{self.space_base}/{model}"

settings = Settings()