Spaces:
Running
Running
File size: 15,943 Bytes
610766f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | # π Three Listing Methods - Visual Guide
## Method Comparison
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TEXT vs IMAGE vs VIDEO β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
METHOD 1: TEXT
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
User Flow:
User Types: "3-bed, 2-bath, Lagos, 500k/month, has WiFi, AC"
β
AI Extracts: bedrooms=3, bathrooms=2, location=Lagos, price=500000, etc.
β
User Uploads: Images (2-3 photos)
β
Backend: Validates images (property check) + uploads to Cloudflare
β
Result: TEXT DATA + VALIDATED PHOTOS
Data Source:
ββ Bedrooms: FROM TEXT β
ββ Bathrooms: FROM TEXT β
ββ Price: FROM TEXT β
ββ Location: FROM TEXT β
ββ Title: FROM TEXT β
ββ Description: FROM TEXT β
ββ Images: VALIDATED FROM UPLOAD β
ββ Amenities: FROM TEXT OR IMAGES
UI Shows: Draft card with text-extracted data + photos
User Edits: "Change price to 450k", "Add gym to amenities"
Storage: Images β Cloudflare (smart filenames)
METHOD 2: IMAGE
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
User Flow:
User Clicks: "List with Photos"
β
User Uploads: 2-5 photos (NO TEXT DATA PROVIDED)
β
Backend:
ββ Validates images (property check)
ββ EXTRACTS bedrooms, bathrooms, amenities
ββ GENERATES SHORT title (max 2 sentences)
ββ GENERATES description
ββ Creates smart filenames
ββ Uploads to Cloudflare
β
AI Analysis Results:
ββ Bedrooms: 3 (detected from images)
ββ Bathrooms: 2 (detected from images)
ββ Amenities: WiFi, AC, Parking, Pool
ββ Title: "Modern 3-Bed Apartment. Great location!" β SHORT
ββ Description: "Beautiful apartment with modern furnishings..."
ββ Confidence: { bedrooms: 0.95, bathrooms: 0.88, ... }
β
System Asks: "Location? Address? Price?"
β
User Provides: "Lagos, Victoria Island, 500,000/month"
β
Result: COMPLETE LISTING DATA FROM IMAGES + USER-PROVIDED INFO
Data Source:
ββ Bedrooms: FROM IMAGE ANALYSIS β
ββ Bathrooms: FROM IMAGE ANALYSIS β
ββ Amenities: FROM IMAGE ANALYSIS β
ββ Title: AI-GENERATED (SHORT) β
ββ Description: AI-GENERATED β
ββ Images: VALIDATED & UPLOADED β
ββ Price: USER PROVIDED β
ββ Location: USER PROVIDED β
ββ Address: USER PROVIDED β
UI Shows: Draft card with IMAGE-EXTRACTED data + photos
User Edits: "Change title", "Update amenities", "Add bedroom"
Storage: Images β Cloudflare with smart filenames (location_title_date.jpg)
METHOD 3: VIDEO
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
User Flow:
User Clicks: "List with Video"
β
User Uploads: Video (walkthrough, 2-5 minutes)
β
Backend: Uploads to Cloudinary with smart filename
β
System Suggests: "Video uploaded! Please upload 2-3 photos for analysis"
β
User Uploads: 2-3 photos
β
Backend: EXTRACTS data from PHOTOS (same as IMAGE method)
β
Result: DATA FROM PHOTOS + VIDEO URL
Data Source:
ββ Bedrooms: FROM PHOTO ANALYSIS β
ββ Bathrooms: FROM PHOTO ANALYSIS β
ββ Amenities: FROM PHOTO ANALYSIS β
ββ Title: AI-GENERATED from PHOTOS β
ββ Description: AI-GENERATED from PHOTOS β
ββ Images: FROM PHOTOS β
ββ Video: FROM UPLOADED VIDEO β
ββ Price/Location: USER PROVIDED β
UI Shows: Draft card with PHOTO data + video embedded
User Edits: Same as IMAGE method
Storage:
ββ Photos β Cloudflare (smart filenames)
ββ Video β Cloudinary
```
---
## File Storage Comparison
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STORAGE LOCATIONS β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
TEXT METHOD:
Images β Cloudflare (smart filename)
ββ Example: Lagos_Apartment_2025_01_31_0.jpg
IMAGE METHOD:
Photos β Cloudflare (smart filenames)
ββ Example: Lagos_Modern_Apartment_2025_01_31_0.jpg
ββ Example: Lagos_Modern_Apartment_2025_01_31_1.jpg
ββ Example: Lagos_Modern_Apartment_2025_01_31_2.jpg
VIDEO METHOD:
Photos β Cloudflare (smart filenames)
ββ Example: Lagos_3Bed_Apartment_2025_01_31_0.jpg
ββ Example: Lagos_3Bed_Apartment_2025_01_31_1.jpg
ββ Example: Lagos_3Bed_Apartment_2025_01_31_2.jpg
Video β Cloudinary
ββ Example: Lagos_Property_Video_2025_01_31_0.mp4
```
---
## Title & Description Details
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TITLE (SHORT) vs DESCRIPTION (FULL) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
TITLE GENERATION (IMAGE/VIDEO METHOD):
ββββββββββββββββββββββββββββββββββββββββ
Format: MAX 2 SENTENCES - Keep it SHORT!
β
GOOD Examples:
- "Modern 3-Bed Apartment. Great location!"
- "Spacious family home with garden."
- "Luxury studio in downtown area. Fully furnished!"
- "Cozy 2-bed with AC and parking. Prime location!"
β BAD Examples (too long):
- "This is a beautiful 3-bedroom, 2-bathroom modern apartment with contemporary furnishings..."
- "A stunning property featuring modern amenities, excellent lighting, perfect for families..."
DESCRIPTION GENERATION (IMAGE/VIDEO METHOD):
ββββββββββββββββββββββββββββββββββββββββββββββ
Format: FULL 2-3 SENTENCE DESCRIPTION
Example:
"Beautiful 3-bedroom, 2-bathroom modern apartment featuring contemporary
furnishings, air conditioning, WiFi, and private balcony overlooking the
city. Located in a secure, gated community with excellent amenities."
TEXT METHOD:
ββββββββββββ
User-provided title and description (not generated by AI)
```
---
## Smart Filename Examples
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β INTELLIGENT FILENAME GENERATION β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Pattern: {location}_{title}_{timestamp}_{index}.jpg
Examples with different properties:
ββββββββββββββββββββββββββββββββββββββ
Property 1: 3-bed in Lagos
AI-Generated Title: "Modern Apartment with Pool"
Generated Filenames:
ββ Lagos_Modern_Apartment_With_Pool_2025_01_31_120530_0.jpg
ββ Lagos_Modern_Apartment_With_Pool_2025_01_31_120530_1.jpg
ββ Lagos_Modern_Apartment_With_Pool_2025_01_31_120530_2.jpg
Property 2: Cozy studio in Cotonou
AI-Generated Title: "Affordable Studio Apartment"
Generated Filenames:
ββ Cotonou_Affordable_Studio_Apartment_2025_01_31_145000_0.jpg
ββ Cotonou_Affordable_Studio_Apartment_2025_01_31_145000_1.jpg
Property 3: Luxury 5-bed villa in Victoria Island
AI-Generated Title: "Luxury Villa with Garden"
Generated Filenames:
ββ Victoria_Island_Luxury_Villa_With_Garden_2025_01_31_090000_0.jpg
ββ Victoria_Island_Luxury_Villa_With_Garden_2025_01_31_090000_1.jpg
ββ Victoria_Island_Luxury_Villa_With_Garden_2025_01_31_090000_2.jpg
ββ Victoria_Island_Luxury_Villa_With_Garden_2025_01_31_090000_3.jpg
CLOUDFLARE WORKER DEDUPLICATION:
βββββββββββββββββββββββββββββββββ
If same filename uploaded twice:
1st upload β Lagos_Modern_Apartment_With_Pool_2025_01_31_120530_0.jpg
2nd upload β Lagos_Modern_Apartment_With_Pool_2025_01_31_120530_0_1.jpg
3rd upload β Lagos_Modern_Apartment_With_Pool_2025_01_31_120530_0_2.jpg
```
---
## Unified Response Format
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SAME RESPONSE FORMAT FOR ALL THREE METHODS β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
All three methods return the EXACT SAME structure:
{
"success": true,
"listing_method": "text" | "image" | "video", β Method identifier
"extracted_fields": {
"bedrooms": 3, β Number or null
"bathrooms": 2, β Number or null
"amenities": ["WiFi", "AC", "Parking"], β Array of strings
"description": "Beautiful apartment...", β Full description (2-3 sentences)
"title": "Modern 3-Bed. Great location!" β SHORT title (max 2 sentences)
},
"confidence": { β How confident AI is
"bedrooms": 0.95, β 0.0 to 1.0
"bathrooms": 0.88,
"amenities": 0.72,
"title": 0.85,
"description": 0.90
},
"image_urls": [ β Photo URLs
"https://imagedelivery.net/lojiz/Lagos_Modern_Apartment_2025_01_31_0/public",
"https://imagedelivery.net/lojiz/Lagos_Modern_Apartment_2025_01_31_1/public"
],
"video_url": "https://cloudinary.../video.mp4", β ONLY for video method
"suggestions": [ β Next steps
"Verify bedroom count",
"Upload more photos for better accuracy"
]
}
FRONTEND RECEIVES:
β Same structure
β Shows same UI
β Same editing experience
β Same publishing flow
Only difference: listing_method and video_url (if applicable)
```
---
## Decision Tree
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β HOW USER LISTS? β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
START
β
βΌ
Does user have details?
/ \
YES NO
/ \
βΌ βΌ
Uses CHAT: Uses UPLOAD:
Provides Uploads
details via photos/video
text directly
β β
β ββββ Is it a video?
β / \
β YES NO
β / \
β βΌ βΌ
β VIDEO METHOD IMAGE METHOD
β (upload video) (upload photos
β + photos only)
β
ββββββββββββ Uploads photos to validate
β
βΌ
TEXT METHOD
(validate
with photos)
β
βΌ
BACKEND PROCESSES:
βββββββββββββββββββββββββββββββββββββ
β 1. Validate image (property?) β
β 2. Extract/validate fields β
β 3. Generate title + description β
β 4. Create smart filenames β
β 5. Upload to Cloudflare/Cloudinaryβ
βββββββββββββββββββββββββββββββββββββ
β
βΌ
RETURN SAME FORMAT
(bedrooms, bathrooms,
amenities, title,
description, images,
confidence, video_url)
β
βΌ
FRONTEND SHOWS
UNIFIED DRAFT UI
β
βΌ
USER EDITS + PUBLISHES
```
---
## Quick Reference
```
METHOD INPUT EXTRACTION OUTPUT
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
TEXT Text details From text Complete data
+ photos + validate from text
photos + photos
IMAGE Photos only From images Complete data
(no text) (AI analyzes) from images
VIDEO Video From photos Complete data
+ photos (AI analyzes) from photos
+ video URL
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
COMMON THEME: All produce same result β same UI β same experience
```
|