Felipe Silva commited on
Commit
7eaebec
·
1 Parent(s): fc388ed

ajuste decorator

Browse files
Files changed (1) hide show
  1. rag_utils.py +2 -0
rag_utils.py CHANGED
@@ -24,6 +24,7 @@ _embedding_instance = None
24
  _model_instance = None
25
  _tokenizer = None
26
 
 
27
  def get_embedding_model():
28
  global _embedding_instance
29
  if _embedding_instance is None:
@@ -34,6 +35,7 @@ def get_embedding_model():
34
 
35
  # model_name = "Qwen/Qwen2.5-7B-Instruct-GPTQ-Int8" #"Qwen/Qwen2.5-7B-Instruct-AWQ" #"Qwen/Qwen2.5-7B-Instruct"
36
 
 
37
  def get_model():
38
  global _model_instance
39
  if _model_instance is None:
 
24
  _model_instance = None
25
  _tokenizer = None
26
 
27
+ @spaces.GPU
28
  def get_embedding_model():
29
  global _embedding_instance
30
  if _embedding_instance is None:
 
35
 
36
  # model_name = "Qwen/Qwen2.5-7B-Instruct-GPTQ-Int8" #"Qwen/Qwen2.5-7B-Instruct-AWQ" #"Qwen/Qwen2.5-7B-Instruct"
37
 
38
+ @spaces.GPU
39
  def get_model():
40
  global _model_instance
41
  if _model_instance is None: