nabeelarain713 commited on
Commit
16aea0b
·
verified ·
1 Parent(s): d69e4c3
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -51,15 +51,15 @@ def main():
51
 
52
  def send_to_gemini(drawing_path):
53
  llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash-latest")
54
- with open(drawing_path, 'rb') as img_file:
55
- image_content = img_file.read()
56
  message = HumanMessage(
57
  content=[
58
  {
59
  "type": "text",
60
  "text": "Give me the answer of any mathematical representation in the image with the complete solution, and does not say the image contains etc.",
61
  },
62
- {"type": "image", "image": image_content},
63
  ]
64
  )
65
  response = llm.invoke([message]).content
 
51
 
52
  def send_to_gemini(drawing_path):
53
  llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash-latest")
54
+ # with open(drawing_path, 'rb') as img_file:
55
+ # image_content = img_file.read()
56
  message = HumanMessage(
57
  content=[
58
  {
59
  "type": "text",
60
  "text": "Give me the answer of any mathematical representation in the image with the complete solution, and does not say the image contains etc.",
61
  },
62
+ {"type": "image", "image": drawing_path},
63
  ]
64
  )
65
  response = llm.invoke([message]).content