Spaces:
Sleeping
Sleeping
Update tasks/text.py
Browse files- tasks/text.py +5 -4
tasks/text.py
CHANGED
@@ -96,10 +96,11 @@ async def evaluate_text(request: TextEvaluationRequest):
|
|
96 |
x = self.fc3(x) # Output raw logits
|
97 |
return x
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
|
|
103 |
|
104 |
|
105 |
# Set the model to evaluation mode
|
|
|
96 |
x = self.fc3(x) # Output raw logits
|
97 |
return x
|
98 |
|
99 |
+
current_file_path = os.path.abspath(__file__)
|
100 |
+
current_dir = os.path.dirname(current_file_path)
|
101 |
+
|
102 |
+
model_nn = torch.load(os.path.join(current_dir,"model_nn.pth"), map_location=device)
|
103 |
+
|
104 |
|
105 |
|
106 |
# Set the model to evaluation mode
|