sumesh4C commited on
Commit
8ceca59
·
verified ·
1 Parent(s): 6237a4c

Update tasks/text.py

Browse files
Files changed (1) hide show
  1. tasks/text.py +5 -1
tasks/text.py CHANGED
@@ -12,7 +12,7 @@ from sentence_transformers import SentenceTransformer
12
  from xgboost import XGBClassifier
13
  import pickle
14
  import torch
15
-
16
 
17
  router = APIRouter()
18
 
@@ -29,6 +29,9 @@ async def evaluate_text(request: TextEvaluationRequest):
29
  - Makes random predictions from the label space (0-7)
30
  - Used as a baseline for comparison
31
  """
 
 
 
32
  # Get space info
33
  username, space_url = get_space_info()
34
 
@@ -95,6 +98,7 @@ async def evaluate_text(request: TextEvaluationRequest):
95
  x = self.fc3(x) # Output raw logits
96
  return x
97
 
 
98
  model_nn = torch.load("model_nn.pth", map_location=device)
99
 
100
  # Set the model to evaluation mode
 
12
  from xgboost import XGBClassifier
13
  import pickle
14
  import torch
15
+ import os
16
 
17
  router = APIRouter()
18
 
 
29
  - Makes random predictions from the label space (0-7)
30
  - Used as a baseline for comparison
31
  """
32
+
33
+ print(os.getcwd())
34
+
35
  # Get space info
36
  username, space_url = get_space_info()
37
 
 
98
  x = self.fc3(x) # Output raw logits
99
  return x
100
 
101
+
102
  model_nn = torch.load("model_nn.pth", map_location=device)
103
 
104
  # Set the model to evaluation mode