AIDA / LISTING_METHODS_VISUAL_GUIDE.md
destinyebuka's picture
fyp
0b7422c

A newer version of the Gradio SDK is available: 6.6.0

Upgrade

πŸ“Š 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