Update app.py
Browse files
app.py
CHANGED
@@ -357,7 +357,7 @@ agent = initialize_agent(
|
|
357 |
)
|
358 |
def encode_image_to_base64(image_path):
|
359 |
return pytesseract.image_to_string(Image.open(image_path))
|
360 |
-
def chatbot_response(
|
361 |
|
362 |
if query.get('files'):
|
363 |
# Encode image to base64
|
@@ -395,7 +395,6 @@ from gradio import ChatMessage
|
|
395 |
def chatbot_interface(messages,prompt):
|
396 |
response, thought_process = chatbot_response(messages,prompt)
|
397 |
#messages.append(ChatMessage(role="user", content=prompt))
|
398 |
-
print(messages)
|
399 |
for x in prompt["files"]:
|
400 |
messages.append(ChatMessage(role="user", content={"path": x, "mime_type": "image/png"}))
|
401 |
if prompt["text"] is not None:
|
|
|
357 |
)
|
358 |
def encode_image_to_base64(image_path):
|
359 |
return pytesseract.image_to_string(Image.open(image_path))
|
360 |
+
def chatbot_response(history,query):
|
361 |
|
362 |
if query.get('files'):
|
363 |
# Encode image to base64
|
|
|
395 |
def chatbot_interface(messages,prompt):
|
396 |
response, thought_process = chatbot_response(messages,prompt)
|
397 |
#messages.append(ChatMessage(role="user", content=prompt))
|
|
|
398 |
for x in prompt["files"]:
|
399 |
messages.append(ChatMessage(role="user", content={"path": x, "mime_type": "image/png"}))
|
400 |
if prompt["text"] is not None:
|