randydev commited on
Commit
84127ab
1 Parent(s): 6492eff

Update fluxai.py

Browse files
Files changed (1) hide show
  1. fluxai.py +1 -1
fluxai.py CHANGED
@@ -139,7 +139,7 @@ async def fluxai_image(payload: FluxAI):
139
  enhanced_image_bytes = "akeno.jpg"
140
  image.save(enhanced_image_bytes, format="JPEG", quality=95)
141
  with open(enhanced_image_bytes, "rb") as image_file:
142
- encoded_string = base64.b64encode(image_file.read())
143
 
144
  example_test = "Accurately identify the baked good in the image and provide an appropriate and recipe consistent with your analysis."
145
  x = GeminiLatest(api_keys=GOOGLE_API_KEY)
 
139
  enhanced_image_bytes = "akeno.jpg"
140
  image.save(enhanced_image_bytes, format="JPEG", quality=95)
141
  with open(enhanced_image_bytes, "rb") as image_file:
142
+ encoded_string = base64.b64encode(image_file.read()).decode('utf-8')
143
 
144
  example_test = "Accurately identify the baked good in the image and provide an appropriate and recipe consistent with your analysis."
145
  x = GeminiLatest(api_keys=GOOGLE_API_KEY)