Skip to content

Commit 0c15c4b

Browse files
committed
Improved Code readability
1 parent 138b8ff commit 0c15c4b

2 files changed

Lines changed: 3 additions & 54 deletions

File tree

app/api/v1/multimodal.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,13 @@ async def upload_image(
5555
{"filename": file.filename},
5656
)
5757

58-
print("I AM INTO REKOGNITION")
59-
# Get the image description from AWS rekognition
60-
print("OUT FROM REKOGNITION")
61-
label_list = extract_text_from_s3_image(file_url)
62-
print("LABEL LIST: ", label_list)
58+
ocr = extract_text_from_s3_image(file_url)
6359

64-
# Convert the label_list to text for feeding the LLM
65-
# label_str = ", ".join(label["Name"] for label in label_list)
66-
# print("LABEL STR: ", label_str)
67-
68-
# For now: just describe the image
60+
# Creating the prompt
6961
history = [
7062
{
7163
"role": "user",
72-
"content": f"User uploaded an image: The content of image is: \n{label_list}. Prompt:\n {prompt}",
64+
"content": f"User uploaded an image: The content of image is: \n{ocr}. Prompt:\n {prompt}",
7365
}
7466
]
7567

app/test_code.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)