alexgenovese commited on
Commit
64a1867
1 Parent(s): 2268466

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,12 +2,12 @@ from PIL import Image
2
  import requests
3
  import gradio as gr
4
 
5
- from transformers import BlipProcessor, BlipForConditionalGeneration
6
 
7
- model_id = "Salesforce/blip-image-captioning-base"
8
 
9
- model = BlipForConditionalGeneration.from_pretrained(model_id)
10
  processor = BlipProcessor.from_pretrained(model_id)
 
11
 
12
  def launch(input):
13
  image = Image.open(requests.get(input, stream=True).raw).convert('RGB')
 
2
  import requests
3
  import gradio as gr
4
 
5
+ from transformers import BlipProcessor, Blip2ForConditionalGeneration
6
 
7
+ model_id = "Salesforce/blip2-flan-t5-xl"
8
 
 
9
  processor = BlipProcessor.from_pretrained(model_id)
10
+ model = Blip2ForConditionalGeneration.from_pretrained(model_id)
11
 
12
  def launch(input):
13
  image = Image.open(requests.get(input, stream=True).raw).convert('RGB')