Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ question = "Question answering. Is is a scene of Lifting Operation?"
|
|
35 |
if testButton and selected_file != "None":
|
36 |
st.write("Testing the model with the selected image...")
|
37 |
# encoding = processor(image, question, words, boxes=boxes, return_tensors="pt")
|
38 |
-
model_encoding = processor(
|
39 |
model_output = model.generate(**model_encoding)
|
40 |
output_text = processor.batch_decode(model_output, skip_special_tokens=True)[0]
|
41 |
st.write(output_text)
|
|
|
35 |
if testButton and selected_file != "None":
|
36 |
st.write("Testing the model with the selected image...")
|
37 |
# encoding = processor(image, question, words, boxes=boxes, return_tensors="pt")
|
38 |
+
model_encoding = processor(images=image, text=question, return_tensors="pt")
|
39 |
model_output = model.generate(**model_encoding)
|
40 |
output_text = processor.batch_decode(model_output, skip_special_tokens=True)[0]
|
41 |
st.write(output_text)
|