suriya7 Mr-Vicky-01 commited on
Commit
42b3ac3
1 Parent(s): dab7f1e

Update app.py (#1)

Browse files

- Update app.py (23bd4bbdff76dd85d330586782ae652122776111)


Co-authored-by: vicky A <Mr-Vicky-01@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ model = genai.GenerativeModel('gemini-1.5-flash-latest')
14
 
15
  def response(image):
16
  prompt = """You are an intelligent document creator. Could you please extract the words from the given screenshot and provide me document text that matches exact screenshot font and look
17
- important note: if the screenshot not contain any text means you must say 'please upload a valid screenshot'"""
18
  img = Image.open(image)
19
  response = model.generate_content([prompt, img])
20
  return response.text
 
14
 
15
  def response(image):
16
  prompt = """You are an intelligent document creator. Could you please extract the words from the given screenshot and provide me document text that matches exact screenshot font and look
17
+ important note: if the screenshot not contain any text means you must say 'please upload a valid screenshot.'"""
18
  img = Image.open(image)
19
  response = model.generate_content([prompt, img])
20
  return response.text