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