C2MV commited on
Commit
ef03810
1 Parent(s): 3319241

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +3 -7
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
- # Clase para los modelos (opcional, si deseas utilizar pydantic)
10
- class Models(BaseModel):
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():