Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
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>"))
|