VascoBartolo
commited on
Commit
·
16d7281
1
Parent(s):
6d763f7
fix import for the model-5
Browse files- handler.py +2 -9
handler.py
CHANGED
@@ -1,10 +1,3 @@
|
|
1 |
-
import transformers
|
2 |
-
import logging
|
3 |
-
|
4 |
-
# Print the transformers package version
|
5 |
-
logging.basicConfig(level=logging.INFO)
|
6 |
-
logging.info(f"Transformers version: {transformers.__version__}")
|
7 |
-
|
8 |
from typing import Dict, List, Any
|
9 |
import torch
|
10 |
from transformers import LlavaNextVideoForConditionalGeneration, LlavaNextVideoProcessor
|
@@ -12,8 +5,8 @@ from transformers import LlavaNextVideoForConditionalGeneration, LlavaNextVideoP
|
|
12 |
class EndpointHandler:
|
13 |
def __init__(self, path=""):
|
14 |
# Load the model and processor
|
15 |
-
self.model = LlavaNextVideoForConditionalGeneration.from_pretrained(
|
16 |
-
self.processor = LlavaNextVideoProcessor.from_pretrained(
|
17 |
|
18 |
# Ensure the model is in evaluation mode
|
19 |
self.model.eval()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from typing import Dict, List, Any
|
2 |
import torch
|
3 |
from transformers import LlavaNextVideoForConditionalGeneration, LlavaNextVideoProcessor
|
|
|
5 |
class EndpointHandler:
|
6 |
def __init__(self, path=""):
|
7 |
# Load the model and processor
|
8 |
+
self.model = LlavaNextVideoForConditionalGeneration.from_pretrained('EnariGmbH/surftown-1.0')
|
9 |
+
self.processor = LlavaNextVideoProcessor.from_pretrained('EnariGmbH/surftown-1.0')
|
10 |
|
11 |
# Ensure the model is in evaluation mode
|
12 |
self.model.eval()
|