Organized the application into separate frontend and backend directories for cleaner deployment and better separation of concerns. Frontend Directory (frontend/): - index.html: Single-page web interface (renamed from web_ui.html) - README.md: Frontend deployment guide - Total size: ~113 KB (self-contained) - Smart base path detection (works at / or /ai_qc/) - No configuration changes required Backend Directory (backend/): - All Python files (api_server.py, llm_config.py, etc.) - visual_qc_apps/: 33 QC check modules - profiles/: 6 QC profile configurations - brand_guidelines/: Reference asset storage - config/: Environment configurations - scripts/: Deployment automation - uploads/, output/: Data directories - requirements.txt, ai_qc.service, apache_config.conf - Complete documentation New Documentation: - FOLDER_STRUCTURE.md: Comprehensive guide to new structure - frontend/README.md: Frontend deployment instructions - backend/BACKEND_README.md: Backend deployment guide Deployment Mapping: - frontend/ → /var/www/html/ai_qc/ (web root) - backend/ → /opt/ai_qc/ (application directory) Benefits: - Clear separation of concerns - Backend code not in web-accessible directory - Independent frontend/backend updates - Matches server's existing patterns (/opt/veo3, /opt/voice2text) - Industry-standard architecture - Easy to deploy and maintain Original files preserved in root directory for reference. Ready for production deployment following MIGRATION_GUIDE.md. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
77 lines
No EOL
3.4 KiB
Python
77 lines
No EOL
3.4 KiB
Python
import os
|
|
import sys
|
|
|
|
# Add parent directory to path to import shared modules
|
|
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
|
|
|
|
from visual_qc_apps.flask_app_template import FlaskAppTemplate
|
|
|
|
class CurvedEdgesDigitalApp(FlaskAppTemplate):
|
|
"""
|
|
Curved Edges Check - Digital Materials Specific
|
|
Optimized for digital materials like web banners, social media, display ads, email graphics
|
|
"""
|
|
|
|
def __init__(self):
|
|
# Define the digital-specific prompt
|
|
prompt = """You are conducting a visual quality-control check on a DIGITAL MATERIAL (web banner, social media post, display ad, email graphic, website hero image, etc.). Your task is to determine whether the digital advertisement utilizes curved outer edges instead of sharp angles, considering digital-specific design requirements.
|
|
|
|
DIGITAL-SPECIFIC EVALUATION CRITERIA:
|
|
1. **Digital Display Considerations**:
|
|
- Check if curved edges render properly on various screen sizes and resolutions
|
|
- Ensure curved elements work across different digital platforms and browsers
|
|
- Consider how curves appear on mobile vs desktop displays
|
|
|
|
2. **Digital Design Context**:
|
|
- Evaluate curved edges in context of responsive design principles
|
|
- Consider interaction design and user experience implications
|
|
- Assess how curved edges work with digital typography and UI elements
|
|
|
|
3. **Platform Optimization**:
|
|
- Consider specific platform requirements (social media dimensions, ad networks)
|
|
- Evaluate loading performance impact of curved edge graphics
|
|
- Check compatibility with various digital formats (PNG, JPG, SVG, etc.)
|
|
|
|
4. **User Interface Integration**:
|
|
- Assess how curved edges integrate with clickable elements
|
|
- Consider accessibility implications for screen readers
|
|
- Evaluate visual hierarchy in digital context
|
|
|
|
STEPS TO EVALUATE:
|
|
1. Identify the specific digital format (banner, social post, display ad, etc.)
|
|
2. Examine the advertisement's curved edge implementation
|
|
3. Assess technical feasibility across digital platforms
|
|
4. Evaluate user experience and accessibility considerations
|
|
5. Check for proper integration with digital design standards
|
|
|
|
DIGITAL FORMAT CONSIDERATIONS:
|
|
- **Web Banners**: CSS-compatible curves that load efficiently
|
|
- **Social Media**: Platform-optimized curves that work in feeds
|
|
- **Display Ads**: Programmatic-friendly curved elements
|
|
- **Email Graphics**: Email client compatible curved designs
|
|
|
|
YOUR OUTPUT:
|
|
First, identify the digital format type.
|
|
Confirm whether curved edges are present and optimized for digital display.
|
|
State whether the advertisement "passes" or "fails" the digital-optimized curved-edge criteria.
|
|
If it fails, provide 1-2 concise recommendations specific to digital implementation.
|
|
|
|
Finally, include a JSON code block with these fields:
|
|
|
|
{
|
|
"digital_format_detected": "[detected digital format]",
|
|
"curved_edges_present": true or false,
|
|
"digital_platform_optimized": true or false,
|
|
"responsive_design_compatible": true or false,
|
|
"curved_edge_criteria": "Pass" or "Fail",
|
|
"score": [1-10 rating],
|
|
"recommendations": ["List of digital-specific recommendations if applicable, else an empty array"]
|
|
}"""
|
|
|
|
# Initialize the Flask app with the prompt
|
|
super().__init__(__name__, prompt)
|
|
|
|
# Run the app if executed directly
|
|
if __name__ == "__main__":
|
|
app = CurvedEdgesDigitalApp()
|
|
app.run(debug=True) |