DongfuJiang commited on
Commit
2d2f625
1 Parent(s): 3abea23
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -10,8 +10,8 @@ import functools
10
  from transformers import AutoProcessor, Idefics2ForConditionalGeneration
11
  from models.conversation import conv_templates
12
  from typing import List
13
- processor = AutoProcessor.from_pretrained("Mantis-VL/mantis-8b-idefics2-video-eval-95k-mantis-2epoch_4096")
14
- model = Idefics2ForConditionalGeneration.from_pretrained("Mantis-VL/mantis-8b-idefics2-video-eval-95k-mantis-2epoch_4096")
15
  MAX_NUM_FRAMES = 24
16
  conv_template = conv_templates["idefics_2"]
17
 
@@ -224,4 +224,4 @@ def build_demo():
224
 
225
  if __name__ == "__main__":
226
  demo = build_demo()
227
- demo.launch()
 
10
  from transformers import AutoProcessor, Idefics2ForConditionalGeneration
11
  from models.conversation import conv_templates
12
  from typing import List
13
+ processor = AutoProcessor.from_pretrained("Mantis-VL/mantis-8b-idefics2-video-eval-high-res-35k-mantis-2epoch_4096")
14
+ model = Idefics2ForConditionalGeneration.from_pretrained("Mantis-VL/mantis-8b-idefics2-video-eval-high-res-35k-mantis-2epoch_4096", device_map="auto")
15
  MAX_NUM_FRAMES = 24
16
  conv_template = conv_templates["idefics_2"]
17
 
 
224
 
225
  if __name__ == "__main__":
226
  demo = build_demo()
227
+ demo.launch(share=True)