randydev commited on
Commit
f32275f
1 Parent(s): 1f589f1

Update fluxai.py

Browse files
Files changed (1) hide show
  1. fluxai.py +2 -2
fluxai.py CHANGED
@@ -148,13 +148,13 @@ async def fluxai_image(payload: FluxAI):
148
  url = "https://randydev-ryuzaki-api.hf.space/api/v1/uploadfile/"
149
  files = {"file": open(file_path, "rb")}
150
  response_uploaded = requests.post(url, files=files).json()
151
- url = response_uploaded.get("url")
152
  example_test = "Explain how this picture looks like."
153
  x = GeminiLatest(api_keys=GOOGLE_API_KEY)
154
  response = x.get_response_image(example_test, file_path)
155
  return SuccessResponse(
156
  status="True",
157
- randydev={"url": url, "caption": response}
158
  )
159
  else:
160
  return StreamingResponse(io.BytesIO(image_bytes), media_type="image/jpeg")
 
148
  url = "https://randydev-ryuzaki-api.hf.space/api/v1/uploadfile/"
149
  files = {"file": open(file_path, "rb")}
150
  response_uploaded = requests.post(url, files=files).json()
151
+ get_url = response_uploaded.get("url")
152
  example_test = "Explain how this picture looks like."
153
  x = GeminiLatest(api_keys=GOOGLE_API_KEY)
154
  response = x.get_response_image(example_test, file_path)
155
  return SuccessResponse(
156
  status="True",
157
+ randydev={"url": get_url, "caption": response}
158
  )
159
  else:
160
  return StreamingResponse(io.BytesIO(image_bytes), media_type="image/jpeg")