File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments