Spaces:
Running
on
Zero
Running
on
Zero
Update config.py
Browse files
config.py
CHANGED
@@ -4,14 +4,10 @@ import torch
|
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
from sentence_transformers import SentenceTransformer
|
6 |
from config import EMBEDDING_MODEL_NAME
|
7 |
-
from pydantic import BaseModel
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
embedding_model: SentenceTransformer
|
12 |
-
tokenizer: AutoTokenizer
|
13 |
-
yi_coder_model: AutoModelForCausalLM
|
14 |
-
device: torch.device
|
15 |
|
16 |
# Cargar el modelo de embeddings
|
17 |
def load_embedding_model():
|
|
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
from sentence_transformers import SentenceTransformer
|
6 |
from config import EMBEDDING_MODEL_NAME
|
7 |
+
from pydantic import BaseModel, ConfigDict
|
8 |
|
9 |
+
class MyModel(BaseModel):
|
10 |
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
|
|
|
|
|
|
|
11 |
|
12 |
# Cargar el modelo de embeddings
|
13 |
def load_embedding_model():
|