randydev commited on
Commit
b753a99
·
verified ·
1 Parent(s): 40d9df7

Update fluxai.py

Browse files
Files changed (1) hide show
  1. fluxai.py +2 -2
fluxai.py CHANGED
@@ -77,7 +77,7 @@ def deduct_tokens_gpt(user_id, amount):
77
 
78
  UPLOAD_DIRECTORY = "uploads"
79
 
80
- @app.get("/uploads/{filename}")
81
  async def get_upload(filename: str):
82
  file_path = os.path.join(UPLOAD_DIRECTORY, filename)
83
  if os.path.exists(file_path):
@@ -125,7 +125,7 @@ async def fluxai_image(payload: FluxAI):
125
  os.makedirs(os.path.dirname(file_path), exist_ok=True)
126
  with open(file_path, "wb") as f:
127
  f.write(enhanced_image_bytes.getvalue())
128
- example_test = "Accurately identify the baked good in the image and provide an appropriate recipe consistent with your analysis."
129
  x = GeminiLatest(api_keys=GOOGLE_API_KEY)
130
  response = x.get_response_image(example_test, file_path)
131
  url = f"https://randydev-ryuzaki-api.hf.space/{file_path}"
 
77
 
78
  UPLOAD_DIRECTORY = "uploads"
79
 
80
+ @router.get("/uploads/{filename}")
81
  async def get_upload(filename: str):
82
  file_path = os.path.join(UPLOAD_DIRECTORY, filename)
83
  if os.path.exists(file_path):
 
125
  os.makedirs(os.path.dirname(file_path), exist_ok=True)
126
  with open(file_path, "wb") as f:
127
  f.write(enhanced_image_bytes.getvalue())
128
+ example_test = "Explain how this picture looks like."
129
  x = GeminiLatest(api_keys=GOOGLE_API_KEY)
130
  response = x.get_response_image(example_test, file_path)
131
  url = f"https://randydev-ryuzaki-api.hf.space/{file_path}"