Spaces:
Runtime error
Runtime error
shadowlilac
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,8 @@ 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"
|
6 |
-
model = BlipForConditionalGeneration.from_pretrained("shadowlilac/visor", ignore_mismatched_sizes=True
|
7 |
|
8 |
def generate_caption(image):
|
9 |
raw_image = Image.fromarray(image)
|
|
|
2 |
from PIL import Image
|
3 |
from transformers import AutoProcessor, BlipForConditionalGeneration
|
4 |
import os
|
5 |
+
processor = AutoProcessor.from_pretrained("shadowlilac/visor")
|
6 |
+
model = BlipForConditionalGeneration.from_pretrained("shadowlilac/visor", ignore_mismatched_sizes=True)
|
7 |
|
8 |
def generate_caption(image):
|
9 |
raw_image = Image.fromarray(image)
|