csk99 commited on
Commit
08283ff
·
verified ·
1 Parent(s): bcba639

Update tasks/text.py

Browse files
Files changed (1) hide show
  1. tasks/text.py +0 -15
tasks/text.py CHANGED
@@ -62,22 +62,7 @@ async def evaluate_text(request: TextEvaluationRequest):
62
 
63
  #--------------------------------------------------------------------------------------------
64
 
65
- """""#load
66
- # Step 1: Use Sentence-BERT to convert text to embeddings
67
- model = SentenceTransformer("dunzhang/stella_en_400M_v5",trust_remote_code=True,
68
- device="cpu",
69
- config_kwargs={"use_memory_efficient_attention": False, "unpad_inputs": False})
70
-
71
- # Convert each sentence into a vector representation (embedding)
72
- embeddings = model.encode(test_dataset['quote'])
73
- # YOUR MODEL INFERENCE CODE HERE
74
- # Update the code below to replace the random baseline by your model inference within the inference pass where the energy consumption and emissions are tracked.
75
- #--------------------------------------------------------------------------------------------
76
 
77
- #load model
78
- with open("stella_400_xgb_500.pkl","rb") as f:
79
- xgb = pickle.load(f)
80
- """""
81
  #predictions = xgb.predict(embeddings)
82
 
83
 
 
62
 
63
  #--------------------------------------------------------------------------------------------
64
 
 
 
 
 
 
 
 
 
 
 
 
65
 
 
 
 
 
66
  #predictions = xgb.predict(embeddings)
67
 
68