Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -67,7 +67,7 @@ class EndpointHandler:
|
|
| 67 |
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
| 68 |
|
| 69 |
# Tokenize input text
|
| 70 |
-
input_ids = self.tokenizer(user_text, return_tensors="pt").input_ids
|
| 71 |
|
| 72 |
# Measure inference time
|
| 73 |
start_time = time.time()
|
|
|
|
| 67 |
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
| 68 |
|
| 69 |
# Tokenize input text
|
| 70 |
+
input_ids = self.tokenizer(user_text, return_tensors="pt").input_ids.to("cuda")
|
| 71 |
|
| 72 |
# Measure inference time
|
| 73 |
start_time = time.time()
|