Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -71,7 +71,7 @@ def generate_answer(image, question):
|
|
71 |
time_start = time.time()
|
72 |
samples = prepare_data(image, question)
|
73 |
samples = model.forward_itm(samples=samples)
|
74 |
-
samples = model.forward_cap(samples=samples, num_captions=5, num_patches=
|
75 |
samples = model.forward_qa_generation(samples)
|
76 |
Img2Prompt = model.prompts_construction(samples)
|
77 |
Img2Prompt_input = tokenizer(Img2Prompt, padding='longest', truncation=True, return_tensors="pt").to(device)
|
|
|
71 |
time_start = time.time()
|
72 |
samples = prepare_data(image, question)
|
73 |
samples = model.forward_itm(samples=samples)
|
74 |
+
samples = model.forward_cap(samples=samples, num_captions=5, num_patches=20)
|
75 |
samples = model.forward_qa_generation(samples)
|
76 |
Img2Prompt = model.prompts_construction(samples)
|
77 |
Img2Prompt_input = tokenizer(Img2Prompt, padding='longest', truncation=True, return_tensors="pt").to(device)
|