Spaces:
Sleeping
Sleeping
Update config.py
Browse files
config.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
from pydantic import BaseSettings
|
|
|
2 |
|
3 |
|
4 |
class Settings(BaseSettings):
|
5 |
-
|
6 |
61: "donut-v16",
|
7 |
81: "donut-v16",
|
8 |
139: "donut-v16",
|
@@ -15,14 +16,6 @@ class Settings(BaseSettings):
|
|
15 |
def get_model_url(self, shipper_id: int) -> str:
|
16 |
model = self.model_map.get(shipper_id, "default-model")
|
17 |
return f"https://{self.space_base}/{model}"
|
18 |
-
|
19 |
-
dataset: str = "senga-ml/dnotes-data-v6"
|
20 |
-
base_config: str = "naver-clova-ix/donut-base"
|
21 |
-
base_processor: str = "naver-clova-ix/donut-base"
|
22 |
-
base_model: str = "naver-clova-ix/donut-base"
|
23 |
-
inference_stats_file: str = "data/donut_inference_stats.json"
|
24 |
-
training_stats_file: str = "data/donut_training_stats.json"
|
25 |
-
evaluate_stats_file: str = "data/donut_evaluate_stats.json"
|
26 |
|
27 |
|
28 |
-
settings = Settings()
|
|
|
1 |
from pydantic import BaseSettings
|
2 |
+
from typing import Dict
|
3 |
|
4 |
|
5 |
class Settings(BaseSettings):
|
6 |
+
model_map: Dict[int, str] = {
|
7 |
61: "donut-v16",
|
8 |
81: "donut-v16",
|
9 |
139: "donut-v16",
|
|
|
16 |
def get_model_url(self, shipper_id: int) -> str:
|
17 |
model = self.model_map.get(shipper_id, "default-model")
|
18 |
return f"https://{self.space_base}/{model}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
|
21 |
+
settings = Settings()
|