ZahirJS commited on
Commit
ddb42dc
·
verified ·
1 Parent(s): 9f1ff75

Update process_flow_generator.py

Browse files
Files changed (1) hide show
  1. process_flow_generator.py +2 -6
process_flow_generator.py CHANGED
@@ -7,15 +7,13 @@ import os
7
  # as process flow diagrams have a different structure and node addition logic.
8
  # However, we'll re-implement the color gradient logic directly for consistency.
9
 
10
- def generate_process_flow_diagram(json_input: str, base_color: str) -> str:
11
  """
12
  Generates a Process Flow Diagram (Flowchart) from JSON input.
13
 
14
  Args:
15
  json_input (str): A JSON string describing the process flow structure.
16
  It must follow the Expected JSON Format Example below.
17
- base_color (str): The hexadecimal color string (e.g., '#19191a') for the base
18
- color of the nodes, from which a gradient will be generated.
19
 
20
  Returns:
21
  str: The filepath to the generated PNG image file.
@@ -78,9 +76,7 @@ def generate_process_flow_diagram(json_input: str, base_color: str) -> str:
78
  }
79
  )
80
 
81
- # Ensure base_color is valid, fallback if not
82
- if not isinstance(base_color, str) or not base_color.startswith('#') or len(base_color) != 7:
83
- base_color = '#19191a' # Fallback to default dark if invalid
84
 
85
  # Helper for color and font based on depth (simulated for flowcharts if needed, or consistent color)
86
  # For flowcharts, often all process/decision nodes are the same color.
 
7
  # as process flow diagrams have a different structure and node addition logic.
8
  # However, we'll re-implement the color gradient logic directly for consistency.
9
 
10
+ def generate_process_flow_diagram(json_input: str) -> str: # Removed base_color parameter
11
  """
12
  Generates a Process Flow Diagram (Flowchart) from JSON input.
13
 
14
  Args:
15
  json_input (str): A JSON string describing the process flow structure.
16
  It must follow the Expected JSON Format Example below.
 
 
17
 
18
  Returns:
19
  str: The filepath to the generated PNG image file.
 
76
  }
77
  )
78
 
79
+ base_color = '#19191a' # Hardcoded base color
 
 
80
 
81
  # Helper for color and font based on depth (simulated for flowcharts if needed, or consistent color)
82
  # For flowcharts, often all process/decision nodes are the same color.