Spaces:
Running
Running
Niki Zhang
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -298,6 +298,10 @@ def submit_caption(image_input, state, generated_caption, text_refiner, visual_c
|
|
| 298 |
|
| 299 |
if not args.disable_gpt and text_refiner:
|
| 300 |
refined_caption = text_refiner.inference(query=generated_caption, controls=controls, context=out['context_captions'], enable_wiki=enable_wiki)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 301 |
new_cap = refined_caption['caption']
|
| 302 |
if refined_caption.get('wiki'):
|
| 303 |
state = state + [(None, "Wiki: {}".format(refined_caption['wiki']))]
|
|
|
|
| 298 |
|
| 299 |
if not args.disable_gpt and text_refiner:
|
| 300 |
refined_caption = text_refiner.inference(query=generated_caption, controls=controls, context=out['context_captions'], enable_wiki=enable_wiki)
|
| 301 |
+
print("generated caption",generated_caption)
|
| 302 |
+
print("controls",controls)
|
| 303 |
+
print("context_catpions",out['context_captions'])
|
| 304 |
+
|
| 305 |
new_cap = refined_caption['caption']
|
| 306 |
if refined_caption.get('wiki'):
|
| 307 |
state = state + [(None, "Wiki: {}".format(refined_caption['wiki']))]
|