Arsenii11 commited on
Commit
5c0022c
·
1 Parent(s): 8d284aa

Changed prompt for Gemini

Browse files
Files changed (1) hide show
  1. mineru_single.py +12 -4
mineru_single.py CHANGED
@@ -195,10 +195,18 @@ def call_gemini_for_image_description(image_data: bytes) -> str:
195
  contents=[
196
  {
197
  "parts": [
198
- {"text": """The provided image is a part of a question paper or markscheme. Extract all the necessary information from the image to be able to identify the question.
199
- To identify the question, we only need the following: question number and question part. Don't include redundant information.
200
- For example, if image contains text like: "Q1 Part A Answer: Life on earth was created by diety..." you should return just "Q1 Part A Mark Scheme"
201
- If there is no text on this image, return the description of the image. 20 words max."""},
 
 
 
 
 
 
 
 
202
  {
203
  "inline_data": {
204
  "mime_type": "image/jpeg",
 
195
  contents=[
196
  {
197
  "parts": [
198
+ {"text": """The provided image is a part of a question paper or markscheme.
199
+ Extract all the necessary information from the image to be able to identify the question.
200
+ To identify the question, we only need the following: question number and question part.
201
+ Don't include redundant information.
202
+ For example, if image contains text like: "Q1 Part A Answer: Life on earth was created by diety..."
203
+ you should return just "Q1 Part A Mark Scheme"
204
+ If there is no text on this image, return the description of the image. 20 words max.
205
+
206
+ If there are not enough data, consider information from the surrounding context.
207
+ Additionally, if the image contains a truncated part, you must describe it and mark as a
208
+ part of some another image that goes before or after current image.
209
+ """},
210
  {
211
  "inline_data": {
212
  "mime_type": "image/jpeg",