File size: 3,175 Bytes
d015b2a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import graphviz
import streamlit as st

def display_architecture_diagram():
    # Create a directed graph
    graph = graphviz.Digraph(format='png')
    
    # Define node styles
    styles = {
        'start': {'shape': 'cylinder', 'style': 'filled', 'fillcolor': '#22c55e', 'fontcolor': 'white'},
        'input': {'shape': 'box', 'style': 'filled', 'fillcolor': '#f97316', 'fontcolor': 'white'},
        'decision': {'shape': 'diamond', 'style': 'filled', 'fillcolor': '#0ea5e9', 'fontcolor': 'white'},
        'process': {'shape': 'box', 'style': 'filled', 'fillcolor': '#8b5cf6', 'fontcolor': 'white'},
        'output': {'shape': 'box', 'style': 'filled', 'fillcolor': '#ec4899', 'fontcolor': 'white'}
    }

    # Add nodes
    graph.node('Start', 'πŸš€ Start\nApplication', **styles['start'])
    graph.node('Upload', 'πŸ“„ Upload DOCX\nResume', **styles['input'])
    graph.node('JobDesc', 'πŸ’Ό Input Job\nDescription', **styles['input'])
    graph.node('ApiKey', 'πŸ”‘ Input GROQ\nAPI Key', **styles['input'])
    graph.node('ChooseAction', 'πŸ”„ Choose\nAction', **styles['decision'])
    graph.node('AnalysisType', 'πŸ“Š Analysis\nType', **styles['decision'])
    
    # Add process nodes with detailed content
    quick_analysis = """Quick Analysis
──────────────
β€’ Skills Match Rating
β€’ Experience Alignment
β€’ Pros and Cons
β€’ Match Percentage"""
    graph.node('QuickAnalysis', quick_analysis, **styles['process'])
    
    in_depth = """In-Depth Analysisc
──────────────
β€’ Comprehensive Skill Gap
β€’ Detailed Experience Review
β€’ Career Path Alignment
β€’ Strategic Recommendations"""
    graph.node('InDepthAnalysis', in_depth, **styles['process'])
    
    enhancement = """Resume Enhancement
──────────────
β€’ In-Depth Analysis
β€’ Format Optimization
β€’ Content Improvement
β€’ Design Enhancement"""
    graph.node('Enhancement', enhancement, **styles['process'])
    
    # Add output nodes
    results = """Analysis Results
──────────────
πŸ“Š Analysis Summary
πŸ“ Recommendations
βœ… Action Items"""
    graph.node('Results', results, **styles['output'])
    
    enhanced = """Enhanced Resume
──────────────
πŸ“‘ Optimized DOCX
πŸ–οΈ Text Highlighting Changes
🌐 HTML Version"""
    graph.node('EnhancedOutputs', enhanced, **styles['output'])

    # Add edges
    graph.edge('Start', 'Upload')
    graph.edge('Upload', 'JobDesc')
    graph.edge('JobDesc', 'ApiKey')
    graph.edge('ApiKey', 'ChooseAction')
    graph.edge('ChooseAction', 'AnalysisType', 'Analyze')
    graph.edge('ChooseAction', 'Enhancement', 'Enhance')
    graph.edge('AnalysisType', 'QuickAnalysis', 'Quick')
    graph.edge('AnalysisType', 'InDepthAnalysis', 'In-Depth')
    graph.edge('QuickAnalysis', 'Results')
    graph.edge('InDepthAnalysis', 'Results')
    graph.edge('Enhancement', 'EnhancedOutputs')
    graph.edge('Results', 'ChooseAction', 'New Analysis')
    graph.edge('EnhancedOutputs', 'ChooseAction', 'New Analysis')

    # Graph settings
    graph.attr(rankdir='TB', splines='ortho')
    
    return graph