Update app.py
Browse files
app.py
CHANGED
@@ -188,17 +188,51 @@ async def request_gpt4o_completion(image_id: str, user_credit: int):
|
|
188 |
|
189 |
# Step 4: Prepare the prompt for Gemini
|
190 |
prompt = f'''
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
|
201 |
-
|
202 |
'''
|
203 |
logging.info("Prompt prepared for Gemini model: " + prompt)
|
204 |
|
|
|
188 |
|
189 |
# Step 4: Prepare the prompt for Gemini
|
190 |
prompt = f'''
|
191 |
+
#Direction
|
192 |
+
You are an employee of finance department of a company. For each task well done, you will be rewarded $1,000 bonus.
|
193 |
+
The boss has come to your office and gave you a task of transfering the content of receipts and business cards onto a google spreadsheet.
|
194 |
+
He hands you two things.
|
195 |
+
One, is a paper containing guideline and example.
|
196 |
+
Two, is an OCR text.
|
197 |
+
|
198 |
+
#Guideline
|
199 |
+
-strictly adhere to the given content of OCR text.
|
200 |
+
-it could be of receipt(s) or business card(s) but not both
|
201 |
+
-any other info that couldn't be classified is sorted into "๊ธฐํ"
|
202 |
+
|
203 |
+
#Example
|
204 |
+
##Receipts
|
205 |
+
Input
|
206 |
+
|
207 |
+
Output
|
208 |
+
-๋ฐํ์ผ: 2024/02/23 20:10
|
209 |
+
-์ํธ: ์์ฑ๋ง์ผ
|
210 |
+
-์ฌ์
์๋ฒํธ: 727-27-01455
|
211 |
+
-ํฉ๊ณ๊ธ์ก: 2,800์
|
212 |
+
-๋ด์ญ:
|
213 |
+
๋ํ๋ฆฌ๋ฒ์ฏ 1,000์ 1๊ฐ
|
214 |
+
์๋ฐฐ์ถ 1,800์ 1๊ฐ
|
215 |
+
-์นด๋๋ฒํธ: 4673-09**-****-515*
|
216 |
+
-์นด๋์ข
๋ฅ: KB๊ตญ๋ฏผ์ฒดํฌ
|
217 |
+
-์น์ธ๋ฒํธ: 30014507
|
218 |
+
-๊ธฐํ:
|
219 |
+
|
220 |
+
##Business Cards
|
221 |
+
Input
|
222 |
+
|
223 |
+
Output
|
224 |
+
-์ด๋ฆ: ๋ฐ์ฅ์
|
225 |
+
-ํ์ฌ๋ช
: ์์ดํ๋ฆฌ๋ง
|
226 |
+
-์์ ๋ฐ ์ง์: ๋ํ
|
227 |
+
-์ฃผ์: ๊ฒฝ๊ธฐ๋ ํ์ฑ์ ์ ๋จ๋ฉด ๋ง๋
๋ก 98๋ฒ๊ธธ 55 (์ฐํธ๋ฒํธ) 18523
|
228 |
+
-์ ํ: (031) 000-0000
|
229 |
+
-ํด๋ํฐ: (031) 000-0000
|
230 |
+
-ํฉ์ค: 010-0000-0000
|
231 |
+
-e-mail: iprima@gmail.com
|
232 |
+
-ํํ์ด์ง: www.sol2u.co.kr
|
233 |
+
-๊ธฐํ:
|
234 |
|
235 |
+
Image content: {extracted_text}
|
236 |
'''
|
237 |
logging.info("Prompt prepared for Gemini model: " + prompt)
|
238 |
|