shadowlilac commited on
Commit
daa9e93
1 Parent(s): 099180b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,9 +1,9 @@
1
  import gradio as gr
2
  from PIL import Image
3
- from transformers import AutoProcessor, Blip2ForConditionalGeneration
4
  import os
5
- processor = AutoProcessor.from_pretrained("shadowlilac/visor-v2", token=os.getenv('HUGGING_FACE_HUB_TOKEN'))
6
- model = Blip2ForConditionalGeneration.from_pretrained("shadowlilac/visor-v2", ignore_mismatched_sizes=True, token=os.getenv('HUGGING_FACE_HUB_TOKEN'))
7
 
8
  def generate_caption(image):
9
  raw_image = Image.fromarray(image)
 
1
  import gradio as gr
2
  from PIL import Image
3
+ from transformers import AutoProcessor, BlipForConditionalGeneration
4
  import os
5
+ processor = AutoProcessor.from_pretrained("shadowlilac/visor", token=os.getenv('HUGGING_FACE_HUB_TOKEN'))
6
+ model = BlipForConditionalGeneration.from_pretrained("shadowlilac/visor", ignore_mismatched_sizes=True, token=os.getenv('HUGGING_FACE_HUB_TOKEN'))
7
 
8
  def generate_caption(image):
9
  raw_image = Image.fromarray(image)