VascoBartolo
commited on
Commit
•
41c3289
1
Parent(s):
4427cbd
change model initialization
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
from typing import Dict, List, Any
|
2 |
import torch
|
3 |
-
from transformers import
|
4 |
|
5 |
class EndpointHandler:
|
6 |
def __init__(self, path="/app"):
|
7 |
config = AutoConfig.from_pretrained(path)
|
8 |
-
self.model =
|
9 |
|
10 |
# Load the processor from the configuration files
|
11 |
self.processor = AutoProcessor.from_pretrained(path)
|
|
|
1 |
from typing import Dict, List, Any
|
2 |
import torch
|
3 |
+
from transformers import LlavaNextVideoForConditionalGeneration, AutoProcessor, AutoConfig
|
4 |
|
5 |
class EndpointHandler:
|
6 |
def __init__(self, path="/app"):
|
7 |
config = AutoConfig.from_pretrained(path)
|
8 |
+
self.model = LlavaNextVideoForConditionalGeneration.from_pretrained(path)
|
9 |
|
10 |
# Load the processor from the configuration files
|
11 |
self.processor = AutoProcessor.from_pretrained(path)
|