conzchunglfxsdu commited on
Commit
66a17eb
·
verified ·
1 Parent(s): aa90218

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -25,8 +25,6 @@ img_join_token = "<|and|>"
25
  sos_token = "[INST]"
26
  eos_token = "[/INST]"
27
 
28
-
29
-
30
  ASPECT_RATIOS = [(1, 1), (1, 4), (4, 1)]
31
  RESOLUTIONS = [(672, 672), (336, 1344), (1344, 336)]
32
 
@@ -92,9 +90,7 @@ async def submit(message, history, doc_ids, last_image):
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)
 
25
  sos_token = "[INST]"
26
  eos_token = "[/INST]"
27
 
 
 
28
  ASPECT_RATIOS = [(1, 1), (1, 4), (4, 1)]
29
  RESOLUTIONS = [(672, 672), (336, 1344), (1344, 336)]
30
 
 
90
 
91
  human_prompt = message['text']
92
  img_prompt = img_to_prompt([image])
93
+ 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."""
 
 
94
  user_prompt = combine_img_with_text(img_prompt,
95
  human_prompt,
96
  ai_role)