Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -580,14 +580,20 @@ def submit_caption(image_input, state, generated_caption, text_refiner, visual_c
|
|
580 |
'factuality': factuality,
|
581 |
'language': language
|
582 |
}
|
583 |
-
|
584 |
prompt_list = [
|
585 |
'Wiki_caption: {Wiki_caption}, you have to generate a caption according to the image and wiki caption. Around {length} words of {sentiment} sentiment in {language}.',
|
586 |
'Wiki_caption: {Wiki_caption}, you have to select sentences from wiki caption that describe the surrounding objects that may be associated with the picture object. Around {length} words of {sentiment} sentiment in {language}.',
|
587 |
'Wiki_caption: {Wiki_caption}. You have to choose sentences from the wiki caption that describe unrelated objects to the image. Around {length} words of {sentiment} sentiment in {language}.',
|
588 |
'Wiki_caption: {Wiki_caption}. You have to choose sentences from the wiki caption that describe unrelated objects to the image. Around {length} words of {sentiment} sentiment in {language}.'
|
589 |
-
]
|
590 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
591 |
|
592 |
if mapped_value != -1:
|
593 |
prompt= prompt_list[mapped_value].format(
|
|
|
580 |
'factuality': factuality,
|
581 |
'language': language
|
582 |
}
|
583 |
+
'''
|
584 |
prompt_list = [
|
585 |
'Wiki_caption: {Wiki_caption}, you have to generate a caption according to the image and wiki caption. Around {length} words of {sentiment} sentiment in {language}.',
|
586 |
'Wiki_caption: {Wiki_caption}, you have to select sentences from wiki caption that describe the surrounding objects that may be associated with the picture object. Around {length} words of {sentiment} sentiment in {language}.',
|
587 |
'Wiki_caption: {Wiki_caption}. You have to choose sentences from the wiki caption that describe unrelated objects to the image. Around {length} words of {sentiment} sentiment in {language}.',
|
588 |
'Wiki_caption: {Wiki_caption}. You have to choose sentences from the wiki caption that describe unrelated objects to the image. Around {length} words of {sentiment} sentiment in {language}.'
|
589 |
+
]
|
590 |
+
'''
|
591 |
+
prompt_list = [
|
592 |
+
'Wiki_caption: {Wiki_caption}, you have to help me understand what is about the selected object and list one fact (describes the object but does not include analysis)as markdown outline with appropriate emojis that describes what you see according to the image and wiki caption. Around {length} words of {sentiment} sentiment in {language}.',
|
593 |
+
'Wiki_caption: {Wiki_caption}, you have to help me understand what is about the selected object and list one fact and one analysis as markdown outline with appropriate emojis that describes what you see according to the image and wiki caption. Around {length} words of {sentiment} sentiment in {language}.',
|
594 |
+
'Wiki_caption: {Wiki_caption}, you have to help me understand what is about the selected object and list one fact and one analysis and one interpret as markdown outline with appropriate emojis that describes what you see according to the image and wiki caption. Around {length} words of {sentiment} sentiment in {language}.',
|
595 |
+
'Wiki_caption: {Wiki_caption}, you have to help me understand what is about the selected object and the objects that may be related to the selected object and list one fact of selected object, one fact of related object and one analysis as markdown outline with appropriate emojis that describes what you see according to the image and wiki caption. Around {length} words of {sentiment} sentiment in {language}.'
|
596 |
+
]
|
597 |
|
598 |
if mapped_value != -1:
|
599 |
prompt= prompt_list[mapped_value].format(
|