KarthikAI commited on
Commit
1e60bad
·
verified ·
1 Parent(s): 5ac2785

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -50,6 +50,8 @@ async def generate(
50
  )
51
  image_url = response.data[0].url # 19. Get the image URL from the response
52
  except Exception as e:
 
 
53
  # 20. Return a JSON error message if the API call fails
54
  return JSONResponse(content={"error": str(e)}, status_code=500)
55
 
 
50
  )
51
  image_url = response.data[0].url # 19. Get the image URL from the response
52
  except Exception as e:
53
+ import traceback
54
+ print("Error in /generate:", traceback.format_exc())
55
  # 20. Return a JSON error message if the API call fails
56
  return JSONResponse(content={"error": str(e)}, status_code=500)
57