SoDa12321 commited on
Commit
1e78ae4
·
verified ·
1 Parent(s): 5e06345

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +7 -7
functions.py CHANGED
@@ -74,21 +74,21 @@ def get_report_sections(report_type):
74
 
75
  def generate_all_sections(data):
76
  """
77
- Generate all sections for the specified report type and display them on Streamlit.
78
  """
 
 
79
  # Retrieve sections based on report type
80
  report_sections = get_report_sections(data.get("report_type"))
81
 
82
- # Loop through each section and generate content
83
- for section_name, function_name in report_sections:
84
  # Call the respective function dynamically
85
  section_content = call_dynamic_function(function_name, data)
86
 
87
- # Display the generated content on Streamlit
88
- st.subheader(section_name) # Display section title
89
- st.write(section_content) # Display section content
 
90
 
91
- # No need to return anything; just display results
92
 
93
 
94
  # Define the actual generation functions, like:
 
74
 
75
  def generate_all_sections(data):
76
  """
77
+ Generate all sections for the specified report type.
78
  """
79
+ sections_content = {}
80
+
81
  # Retrieve sections based on report type
82
  report_sections = get_report_sections(data.get("report_type"))
83
 
 
 
84
  # Call the respective function dynamically
85
  section_content = call_dynamic_function(function_name, data)
86
 
87
+ # Store the generated content in a dictionary
88
+ sections_content[section_name] = section_content
89
+
90
+ return sections_content
91
 
 
92
 
93
 
94
  # Define the actual generation functions, like: