VascoBartolo commited on
Commit
2acfd76
·
1 Parent(s): 5220a75

fix import for the model-2

Browse files
Files changed (1) hide show
  1. 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 AutoModelForSeq2SeqLM, AutoProcessor
4
 
5
  class EndpointHandler:
6
  def __init__(self, path=""):
7
- # Adjust the loading process to handle potential configuration mismatches
8
- self.model = AutoModelForSeq2SeqLM.from_pretrained(
9
- path
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()