VascoBartolo
commited on
Commit
·
2acfd76
1
Parent(s):
5220a75
fix import for the model-2
Browse files- handler.py +4 -6
handler.py
CHANGED
@@ -1,14 +1,12 @@
|
|
1 |
from typing import Dict, List, Any
|
2 |
import torch
|
3 |
-
from transformers import
|
4 |
|
5 |
class EndpointHandler:
|
6 |
def __init__(self, path=""):
|
7 |
-
#
|
8 |
-
self.model =
|
9 |
-
|
10 |
-
)
|
11 |
-
self.processor = AutoProcessor.from_pretrained(path)
|
12 |
|
13 |
# Ensure the model is in evaluation mode
|
14 |
self.model.eval()
|
|
|
1 |
from typing import Dict, List, Any
|
2 |
import torch
|
3 |
+
from transformers import LlavaNextVideoForConditionalGeneration, LlavaNextVideoProcessor
|
4 |
|
5 |
class EndpointHandler:
|
6 |
def __init__(self, path=""):
|
7 |
+
# Load the model and processor
|
8 |
+
self.model = LlavaNextVideoForConditionalGeneration.from_pretrained(path)
|
9 |
+
self.processor = LlavaNextVideoProcessor.from_pretrained(path)
|
|
|
|
|
10 |
|
11 |
# Ensure the model is in evaluation mode
|
12 |
self.model.eval()
|