Spaces:
Runtime error
Runtime error
alexgenovese
commited on
Commit
•
64a1867
1
Parent(s):
2268466
Update app.py
Browse files
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,
|
6 |
|
7 |
-
model_id = "Salesforce/
|
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')
|