Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -313,7 +313,7 @@ def generate_epiphany():
|
|
| 313 |
raw_bytes = image_file.read()
|
| 314 |
# THE FIX:
|
| 315 |
pil_image, scale_size = prepare_vision_image(raw_bytes)
|
| 316 |
-
|
| 317 |
|
| 318 |
try:
|
| 319 |
# Step 1: Accurate Identification
|
|
@@ -390,7 +390,7 @@ def generate_epiphany():
|
|
| 390 |
master_blueprint_url = blu_future.result()
|
| 391 |
|
| 392 |
# Step 4: Record Persistence
|
| 393 |
-
image_url = upload_to_storage(
|
| 394 |
epiphany_record = {
|
| 395 |
"epiphanyId": epiphany_id,
|
| 396 |
"uid": uid,
|
|
|
|
| 313 |
raw_bytes = image_file.read()
|
| 314 |
# THE FIX:
|
| 315 |
pil_image, scale_size = prepare_vision_image(raw_bytes)
|
| 316 |
+
logger.info(f"Titaness Input Size: {len(raw_bytes)/1024/1024:.2f}MB -> Scaled: {scaled_size/1024/1024:.2f}MB")
|
| 317 |
|
| 318 |
try:
|
| 319 |
# Step 1: Accurate Identification
|
|
|
|
| 390 |
master_blueprint_url = blu_future.result()
|
| 391 |
|
| 392 |
# Step 4: Record Persistence
|
| 393 |
+
image_url = upload_to_storage(raw_bytes, f"users/{uid}/epiphanies/{epiphany_id}/vision.jpg", 'image/jpeg')
|
| 394 |
epiphany_record = {
|
| 395 |
"epiphanyId": epiphany_id,
|
| 396 |
"uid": uid,
|