File size: 574 Bytes
2e73be9
 
bb45124
2e73be9
 
bb45124
 
2e73be9
 
1109b63
2e73be9
bb45124
2e73be9
bb45124
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pytesseract

import google.generativeai as genai
api_key = 'AIzaSyB7-RzBwTAfVA-7ZGk2mEOQwOxshpwzhpM' # put your API key here
palm.configure(api_key=api_key)
geminiModel = genai.GenerativeModel(model_name='gemini-pro')


def llm(img):
    text = pytesseract.image_to_string(img, lang='vie')
    # generate text
    prompt = "take this peace of information and give all the information in point wise better format also give some recomendation related to them' " + text
    # print(prompt)
    response  = model.generate_content(prompt)
        
    return response.text