Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ from PIL import Image
|
|
6 |
import gradio as gr
|
7 |
|
8 |
def answer_question(image, question):
|
|
|
9 |
inputs = processor(image, question, return_tensors="pt")
|
10 |
out = model.generate(**inputs)
|
11 |
answer = processor.decode(out[0], skip_special_tokens=True)
|
|
|
6 |
import gradio as gr
|
7 |
|
8 |
def answer_question(image, question):
|
9 |
+
image = np.array(Image.open(image))
|
10 |
inputs = processor(image, question, return_tensors="pt")
|
11 |
out = model.generate(**inputs)
|
12 |
answer = processor.decode(out[0], skip_special_tokens=True)
|