conzchunglfxsdu commited on
Commit
aa90218
·
verified ·
1 Parent(s): 2e9cd18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -92,7 +92,12 @@ async def submit(message, history, doc_ids, last_image):
92
 
93
  human_prompt = message['text']
94
  img_prompt = img_to_prompt([image])
95
- user_prompt = combine_img_with_text(img_prompt, human_prompt)
 
 
 
 
 
96
 
97
  # Return user input immediately
98
  history.append((human_prompt, "<processing>"))
 
92
 
93
  human_prompt = message['text']
94
  img_prompt = img_to_prompt([image])
95
+ ai_role = """Your role is to validate the type of the document in the image by thoroughly examining the content and characteristics of the document.
96
+ Carefully analyze the text, layout, and any distinctive features to accurately determine the document type.
97
+ Your validation should be precise and based on clear, identifiable criteria."""
98
+ user_prompt = combine_img_with_text(img_prompt,
99
+ human_prompt,
100
+ ai_role)
101
 
102
  # Return user input immediately
103
  history.append((human_prompt, "<processing>"))