themeetjani commited on
Commit
105b3e9
1 Parent(s): 08e7c21

Update pages/Auto_Report_Generation.py

Browse files
Files changed (1) hide show
  1. pages/Auto_Report_Generation.py +10 -5
pages/Auto_Report_Generation.py CHANGED
@@ -51,9 +51,14 @@ def all_combined(company_details):
51
  # st.write(dataframe)
52
  st.write("# Auto Report Generation.! 👋")
53
  uploaded_file = st.file_uploader("Choose a file")
54
- json_path = uploaded_file
55
- with open(json_path, 'r') as j:
56
- sample_jsonfile = json.loads(j.read())
57
-
58
- print(all_combined(str(sample_jsonfile)))
 
59
 
 
 
 
 
 
51
  # st.write(dataframe)
52
  st.write("# Auto Report Generation.! 👋")
53
  uploaded_file = st.file_uploader("Choose a file")
54
+
55
+ if 'report' not in session_state:
56
+ session_state['report']= ""
57
+
58
+ def classify(text):
59
+ session_state['report'] = all_combined(uploaded_file)
60
 
61
+
62
+ st.text_area("result", value=session_state['report'])
63
+
64
+ st.button("Generate a Report", on_click=classify, args=[text])