Spaces:
Build error
Build error
Update app.py (#1)
Browse files- Update app.py (23bd4bbdff76dd85d330586782ae652122776111)
Co-authored-by: vicky A <Mr-Vicky-01@users.noreply.huggingface.co>
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
|