Spaces:
Sleeping
A newer version of the Streamlit SDK is available:
1.53.1
AI Studio Assignment - Complete Solution Guide
π― Assignment Overview
Position: Generative AI Workflow Builder / Prompting Specialist
Company: Ritz Media World
Objective: Build a rapid prototype for an internal AI platform to support creative teams
π Part 1: System Design & Planning (45 min)
Architecture Overview
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI STUDIO PLATFORM β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββΌββββββββββββββββββ
β β β
ββββββΌβββββ ββββββΌβββββ ββββββΌβββββ
β Frontend β β Backend β β Storage β
β(Streamlit)β β(Python) β β (Local) β
βββββββββββ βββββββββββ βββββββββββ
β β β
ββββββΌβββββββββββββββββββΌββββββββββββββββββ
β CORE MODULES β
ββββββββββββββββββββββββββββββββββββββββββββ€
β 1. Ideation Prompt Board β
β - Prompt templates β
β - Version control β
β - Strategy documentation β
β β
β 2. Image Generator β
β - HuggingFace (Flux Schnell) β
β - Stable Diffusion (planned) β
β - Midjourney (future) β
β β
β 3. Video Generator β
β - RunwayML Gen-2 (stub) β
β - Stable Video Diffusion (stub) β
β β
β 4. 3D Asset Creator β
β - Shap-E (demo) β
β - Blender integration β
β - Unity export β
β β
β 5. Project Library β
β - Asset management β
β - Download/Export β
β - Organization β
β β
β 6. History & Feedback β
β - Prompt versioning β
β - Team feedback β
β - Rating system β
β β
β 7. Pipeline & Export β
β - Blender scripts β
β - Unity integration β
β - Workflow automation β
ββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββΌββββββββββββ
β β β
ββββββΌββββ βββββΌβββββ βββββΌβββββ
βExternal β βExternalβ βExport β
β APIs β β Tools β βTargets β
βββββββββββ ββββββββββ ββββββββββ
External AI Tools Integration
| Tool | Purpose | Status | Why Chosen |
|---|---|---|---|
| HuggingFace Flux | Image generation | β Active | Free tier, fast, high quality |
| Stable Diffusion | Image generation | π Planned | Industry standard, customizable |
| Midjourney | Premium images | π Future | Best quality, but API limited |
| RunwayML Gen-2 | Video generation | π§ Demo | Leader in AI video |
| Stable Video Diffusion | Video generation | π Planned | Open source alternative |
| Shap-E | 3D generation | π§ Demo | OpenAI's 3D model generator |
Workflow: Brief to Final Asset
1. CREATIVE BRIEF SUBMISSION
ββ> Project created with name, description, target audience
β
2. IDEATION PHASE
ββ> Prompt Board β Template selection β Strategy notes
β
3. PROMPT REFINEMENT
ββ> Version control β A/B testing β Team collaboration
β
4. ASSET GENERATION
ββ> IMAGE: HuggingFace API β PNG files
ββ> VIDEO: RunwayML API β MP4 files
ββ> 3D: Shap-E API β FBX/OBJ files
β
5. REVIEW & FEEDBACK
ββ> Team rates assets β Comments β Iteration requests
β
6. ITERATION LOOP
ββ> Refine prompts β Re-generate β Compare versions
β
7. EXPORT & INTEGRATION
ββ> 3D Assets β Blender (.blend files)
ββ> 3D Assets β Unity (FBX import)
ββ> Images β Marketing materials
ββ> Videos β Campaign distribution
β
8. FINAL DELIVERY
ββ> Campaign launch β Performance tracking
Key Features
- Prompt Versioning: Track every iteration with timestamps
- Feedback System: Team members rate and comment on outputs
- Blender Integration: Direct export of 3D assets to .blend format
- Unity Support: FBX export for interactive experiences
- Asset Curation: Library with search, filter, download
π¨ Part 2: Prompt Engineering Exercise (45 min)
Luxury Real Estate Marketing Prompts
Image Prompt 1: Exterior Shot
Prompt:
Ultra-modern luxury villa at golden hour, infinity pool with crystal-clear reflections,
sleek glass facade with floor-to-ceiling windows, lush tropical landscaping,
ocean view in background, palm trees swaying, warm ambient lighting,
photorealistic, architectural photography, 8K resolution, professional composition
Strategy:
- Time of Day: Golden hour creates premium aesthetic
- Technical Details: Specifies materials (glass, water reflections)
- Composition: Clear subject hierarchy (villa primary, ocean secondary)
- Quality Markers: "photorealistic", "8K", "professional"
- Use Case: Property listing hero image, marketing brochures
- Integration: Can be used as reference for 3D environment modeling
Image Prompt 2: Interior Shot
Prompt:
Spacious penthouse interior, floor-to-ceiling panoramic windows,
city skyline at dusk, designer furniture by Italian brands,
marble flooring with subtle veining, ambient recessed lighting,
wide-angle perspective, luxury lifestyle aesthetic, high dynamic range,
interior design magazine quality
Strategy:
- Atmosphere: Lifestyle focus over pure architecture
- Brand Elements: "Italian brands" suggests luxury without naming brands
- Lighting: "dusk" + "recessed lighting" = warm, inviting
- Camera: Wide-angle shows spaciousness
- Use Case: Property brochures, virtual staging reference
- Integration: Layout can guide 3D interior scene setup
Video Prompt 1: Aerial Tour
Prompt:
Cinematic aerial drone footage starting from ocean view, smooth gimbal motion
flying towards modern beachfront estate, revealing infinity pool and tropical gardens,
golden hour lighting with warm color grading, 4K resolution, establishing shot
transitioning to closer detail, professional real estate cinematography,
10 seconds duration
Strategy:
- Camera Movement: Specific path (ocean β property)
- Reveal: Creates anticipation and impact
- Color Grading: Warm tones = luxury/comfort
- Duration: 10 seconds perfect for social media teasers
- Use Case: Instagram Reels, YouTube ads, property website hero
- Technical: Smooth motion keywords ensure no jarring movements
Video Prompt 2: Interior Walkthrough
Prompt:
Day-to-night time-lapse sequence of luxury condominium lobby,
marble floors reflecting designer pendant lighting, residents entering and exiting
in elegant attire, smooth slider camera movement, transitions from natural daylight
to ambient evening illumination, 15 seconds, atmospheric depth,
premium hospitality aesthetic
Strategy:
- Time-lapse: Shows building lifecycle and activity
- Human Element: "residents" adds life and scale
- Lighting Transition: Demonstrates building at different times
- Movement Type: Slider = professional, stable
- Use Case: Amenity showcase, lifestyle marketing
- Emotional Goal: Conveys community and vibrancy
3D Asset Prompt: Furniture Piece
Prompt:
High-polygon 3D model of contemporary outdoor lounge chair,
teak wood frame with realistic wood grain texture,
white weather-resistant cushions with subtle fabric weave detail,
clean geometry suitable for subdivision, PBR materials with proper UV mapping,
architectural visualization quality, export in FBX and OBJ formats,
includes diffuse, normal, and roughness maps
Strategy:
- Technical Specs: "high-polygon", "PBR", "UV mapping"
- Material Detail: Specific about textures needed
- Export Formats: FBX for Unity, OBJ for Blender
- Use Case: Populate 3D property scenes, product visualization
- Integration Path:
- Generate 3D model β Import to Blender
- Apply materials β Place in property scene
- Render final marketing images
- Professional Standards: "architectural visualization quality"
π Part 3: Critique & Iteration Workflow (30 min)
Sample Image Critique
Generated Image Analysis:
Image 1: Luxury Villa Exterior
β
STRENGTHS:
- Composition follows rule of thirds
- Lighting captures golden hour effectively
- Pool water has decent reflections
β AREAS FOR IMPROVEMENT:
1. Pool reflections lack sharpness
β FIX: Add "crystal-clear water reflections, mirror-like surface"
2. Furniture appears generic
β FIX: Specify "designer outdoor furniture, teak loungers"
3. Sky could be more dramatic
β FIX: Add "dramatic clouds, vibrant sunset colors"
4. Foreground lacks detail
β FIX: Include "landscaped garden in foreground, tropical flowers"
Refined Prompt (Version 2):
Ultra-modern luxury villa at golden hour, infinity pool with crystal-clear
mirror-like reflections, designer teak outdoor loungers, dramatic clouds
with vibrant sunset colors, landscaped garden in foreground with tropical
flowers, sleek glass facade, photorealistic, 8K, architectural photography
Rapid Iteration Workflow
ITERATION PROCESS (Per Asset Type):
βββββββββββββββββββββββββββββββββββββββββββ
β Step 1: BATCH GENERATION β
β - Generate 3-4 variants of prompt β
β - Use same settings for consistency β
β - Takes ~2-3 minutes β
βββββββββββββββββ¬ββββββββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββββββββββββ
β Step 2: QUICK SHORTLIST β
β - Team picks top 2 candidates β
β - Identify what works vs. doesn't β
β - Takes ~2 minutes β
βββββββββββββββββ¬ββββββββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββββββββββββ
β Step 3: GATHER FEEDBACK β
β - What's missing? β
β - What's wrong compositionally? β
β - What matches brand guidelines? β
β - Takes ~3 minutes β
βββββββββββββββββ¬ββββββββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββββββββββββ
β Step 4: REFINE PROMPT β
β - Add specific missing elements β
β - Adjust technical parameters β
β - Strengthen quality keywords β
β - Takes ~2 minutes β
βββββββββββββββββ¬ββββββββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββββββββββββ
β Step 5: RE-GENERATE β
β - Generate 2-3 refined versions β
β - Compare with original batch β
β - Takes ~2 minutes β
βββββββββββββββββ¬ββββββββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββββββββββββ
β Step 6: FINAL SELECTION β
β - Choose winner or repeat cycle β
β - Maximum 3 iteration cycles β
β - Total time: ~15 minutes per asset β
βββββββββββββββββββββββββββββββββββββββββββ
SCALING STRATEGY:
- Parallel processing: Multiple team members work on different assets
- Template reuse: Successful prompts become templates
- A/B testing: Generate variants of successful prompts for future use
- Feedback database: Track what works for different property types
π§ Part 4: Integration & Pipeline Proposal (30 min)
Complete Production Pipeline
# PIPELINE PSEUDOCODE
class CreativeCampaignPipeline:
"""
End-to-end workflow from concept to campaign-ready visuals
"""
def __init__(self, project_name, creative_brief):
self.project = self.create_project(project_name, creative_brief)
self.assets = []
def execute_full_pipeline(self):
"""
Main pipeline execution
"""
# PHASE 1: IDEATION
prompts = self.ideation_phase()
# PHASE 2: GENERATION
raw_assets = self.generation_phase(prompts)
# PHASE 3: REVIEW & ITERATION
refined_assets = self.review_and_iterate(raw_assets)
# PHASE 4: INTEGRATION & EXPORT
final_assets = self.integration_phase(refined_assets)
# PHASE 5: DELIVERY
self.campaign_launch(final_assets)
return final_assets
# ============================================
# PHASE 1: IDEATION
# ============================================
def ideation_phase(self):
"""
Creative team brainstorms and refines prompts
"""
prompts = {
'images': [],
'videos': [],
'3d_assets': []
}
# Load templates based on project type
if self.project.type == "luxury_real_estate":
prompts['images'] = [
self.load_template("villa_exterior"),
self.load_template("penthouse_interior"),
self.load_template("amenity_spaces")
]
prompts['videos'] = [
self.load_template("aerial_tour"),
self.load_template("lifestyle_montage")
]
prompts['3d_assets'] = [
self.load_template("outdoor_furniture"),
self.load_template("interior_decor")
]
# Team adds custom refinements
prompts = self.team_refinement_session(prompts)
# Version control
self.save_prompt_versions(prompts)
return prompts
# ============================================
# PHASE 2: GENERATION
# ============================================
def generation_phase(self, prompts):
"""
Generate all asset types using appropriate AI tools
"""
assets = []
# Generate Images
for img_prompt in prompts['images']:
result = self.generate_image(
prompt=img_prompt['text'],
provider="huggingface",
model="flux-schnell",
n_variants=3 # Generate multiple for selection
)
assets.append({
'type': 'image',
'prompt': img_prompt,
'outputs': result,
'status': 'pending_review'
})
# Generate Videos
for vid_prompt in prompts['videos']:
result = self.generate_video(
prompt=vid_prompt['text'],
provider="runwayml",
duration=10,
fps=30
)
assets.append({
'type': 'video',
'prompt': vid_prompt,
'outputs': result,
'status': 'pending_review'
})
# Generate 3D Assets
for asset_prompt in prompts['3d_assets']:
result = self.generate_3d_model(
prompt=asset_prompt['text'],
provider="shap_e",
export_format="fbx"
)
assets.append({
'type': '3d',
'prompt': asset_prompt,
'outputs': result,
'status': 'pending_review'
})
return assets
# ============================================
# PHASE 3: REVIEW & ITERATION
# ============================================
def review_and_iterate(self, assets, max_iterations=3):
"""
Team reviews assets and iterates until approved
"""
refined_assets = []
for asset in assets:
iteration_count = 0
approved = False
while not approved and iteration_count < max_iterations:
# Present to team
feedback = self.get_team_feedback(asset)
if feedback['approved']:
asset['status'] = 'approved'
refined_assets.append(asset)
approved = True
else:
# Refine prompt based on feedback
refined_prompt = self.refine_prompt(
asset['prompt'],
feedback['suggestions']
)
# Re-generate
if asset['type'] == 'image':
new_output = self.generate_image(refined_prompt)
elif asset['type'] == 'video':
new_output = self.generate_video(refined_prompt)
elif asset['type'] == '3d':
new_output = self.generate_3d_model(refined_prompt)
asset['outputs'] = new_output
asset['iteration'] = iteration_count + 1
iteration_count += 1
if not approved:
# Mark for manual review if iterations exhausted
asset['status'] = 'needs_manual_review'
refined_assets.append(asset)
return refined_assets
# ============================================
# PHASE 4: INTEGRATION & EXPORT
# ============================================
def integration_phase(self, assets):
"""
Export and integrate assets into production tools
"""
final_assets = []
for asset in assets:
if asset['status'] != 'approved':
continue
if asset['type'] == 'image':
# Optimize for web
optimized = self.optimize_for_web(asset['outputs'])
final_assets.append({
'asset': optimized,
'destination': 'marketing_materials',
'formats': ['jpg', 'png', 'webp']
})
elif asset['type'] == 'video':
# Encode for distribution
encoded = self.encode_video(asset['outputs'])
final_assets.append({
'asset': encoded,
'destination': 'campaign_distribution',
'formats': ['mp4', 'webm']
})
elif asset['type'] == '3d':
# Export to Blender and Unity
blender_export = self.export_to_blender(asset['outputs'])
unity_export = self.export_to_unity(asset['outputs'])
final_assets.append({
'asset': asset['outputs'],
'blender_file': blender_export,
'unity_asset': unity_export,
'destination': '3d_pipeline',
'formats': ['fbx', 'obj', 'blend']
})
return final_assets
# ============================================
# PHASE 5: CAMPAIGN LAUNCH
# ============================================
def campaign_launch(self, final_assets):
"""
Final review and campaign deployment
"""
# Create campaign package
package = {
'project_id': self.project.id,
'assets': final_assets,
'metadata': self.generate_metadata(),
'launch_date': datetime.now()
}
# Save to library
self.save_to_project_library(package)
# Generate delivery report
report = self.generate_delivery_report(package)
return package, report
# ============================================
# HELPER METHODS
# ============================================
def generate_image(self, prompt, provider="huggingface", **kwargs):
"""Call image generation API"""
api = self.get_api_client(provider)
return api.generate(prompt, **kwargs)
def export_to_blender(self, model_path):
"""
Export 3D asset to Blender format
"""
# Python script that runs in Blender
blender_script = f"""
import bpy
# Import the FBX file
bpy.ops.import_scene.fbx(filepath="{model_path}")
# Set up materials and lighting
# ... material setup code ...
# Save as .blend file
output_path = "{model_path.replace('.fbx', '.blend')}"
bpy.ops.wm.save_as_mainfile(filepath=output_path)
"""
# Execute script (would need Blender CLI or API)
return self.execute_blender_script(blender_script)
def export_to_unity(self, model_path):
"""
Prepare asset for Unity import
"""
# Ensure FBX is Unity-compatible
# Set proper scale, rotation, materials
unity_ready_path = self.convert_for_unity(model_path)
return unity_ready_path
# ============================================
# EXAMPLE USAGE
# ============================================
if __name__ == "__main__":
# Initialize pipeline
brief = {
'project_name': 'Luxury Beachfront Villas Q4 2024',
'description': 'Marketing campaign for ultra-luxury beachfront properties',
'target_audience': 'Ultra-high-net-worth individuals, 45-65 years old',
'style_guidelines': 'Photorealistic, warm tones, lifestyle-focused',
'deliverables': ['Hero images', 'Video tour', '3D walkthrough assets']
}
pipeline = CreativeCampaignPipeline(
project_name=brief['project_name'],
creative_brief=brief
)
# Execute full workflow
final_assets = pipeline.execute_full_pipeline()
print(f"Campaign complete! Generated {len(final_assets)} final assets.")
π Presentation Structure (30 min)
Slide Flow
Opening (2 min)
- Problem statement
- Solution overview
System Architecture (8 min)
- Show architecture diagram
- Explain module interactions
- Highlight integration points
Live Demo (10 min)
- Walk through Streamlit interface
- Generate sample images
- Show feedback system
- Demonstrate export features
Prompt Engineering Examples (5 min)
- Show 5 luxury real estate prompts
- Explain strategy for each
Iteration Workflow (3 min)
- Critique sample outputs
- Show refinement process
Pipeline & Scaling (2 min)
- Present pseudocode
- Discuss production readiness
Q&A
β Checklist for Completion
- System architecture diagram created
- Streamlit app with all 7 tabs functional
- 5 prompts written with strategies
- Image critique examples prepared
- Pipeline pseudocode documented
- Blender/Unity integration outlined
- Demo data populated
- Presentation slides ready
- Speaking points prepared
π‘ Tips for Presentation
- Start with live demo - Show don't tell
- Emphasize workflow - Not just tech
- Show iteration process - Critical for buy-in
- Highlight scalability - Growth potential
- Be honest about limitations - Demo vs production
- Connect to business value - ROI, efficiency gains
π Expected Outcomes
By completing this assignment you demonstrate:
β
Understanding of AI tool landscape
β
Prompt engineering expertise
β
System design capabilities
β
Integration knowledge (Blender/Unity)
β
Workflow optimization skills
β
Production readiness mindset
Good luck! π