Spaces:
Sleeping
Sleeping
Commit
·
707718c
1
Parent(s):
14113bb
dev commit
Browse files- cloudzy/routes/upload.py +5 -3
cloudzy/routes/upload.py
CHANGED
|
@@ -101,15 +101,14 @@ async def upload_photo(
|
|
| 101 |
|
| 102 |
APP_DOMAIN = os.getenv("APP_DOMAIN")
|
| 103 |
|
| 104 |
-
print("APP_DOMAINXXXXX",APP_DOMAIN)
|
| 105 |
|
| 106 |
image_url = f"{APP_DOMAIN}uploads/{saved_filename}"
|
| 107 |
-
|
| 108 |
|
| 109 |
|
| 110 |
try:
|
| 111 |
|
| 112 |
-
|
| 113 |
|
| 114 |
describer = ImageDescriber()
|
| 115 |
# result = describer.describe_image("https://userx2000-cloudzy-ai-challenge.hf.space/uploads/img_1_20251024_064435_667.jpg")
|
|
@@ -121,6 +120,9 @@ async def upload_photo(
|
|
| 121 |
except Exception as e:
|
| 122 |
raise HTTPException(status_code=500, detail=f"Error processing image: {str(e)}")
|
| 123 |
|
|
|
|
|
|
|
|
|
|
| 124 |
# Generate AI analysis
|
| 125 |
tags = result.get("tags", [])
|
| 126 |
caption = result.get("caption", "")
|
|
|
|
| 101 |
|
| 102 |
APP_DOMAIN = os.getenv("APP_DOMAIN")
|
| 103 |
|
|
|
|
| 104 |
|
| 105 |
image_url = f"{APP_DOMAIN}uploads/{saved_filename}"
|
| 106 |
+
|
| 107 |
|
| 108 |
|
| 109 |
try:
|
| 110 |
|
| 111 |
+
|
| 112 |
|
| 113 |
describer = ImageDescriber()
|
| 114 |
# result = describer.describe_image("https://userx2000-cloudzy-ai-challenge.hf.space/uploads/img_1_20251024_064435_667.jpg")
|
|
|
|
| 120 |
except Exception as e:
|
| 121 |
raise HTTPException(status_code=500, detail=f"Error processing image: {str(e)}")
|
| 122 |
|
| 123 |
+
|
| 124 |
+
return result
|
| 125 |
+
|
| 126 |
# Generate AI analysis
|
| 127 |
tags = result.get("tags", [])
|
| 128 |
caption = result.get("caption", "")
|