Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -36,8 +36,16 @@ if "rfp_summary" not in st.session_state:
|
|
36 |
st.session_state["rfp_summary"] = ""
|
37 |
if "estimation_data" not in st.session_state:
|
38 |
st.session_state["estimation_data"] = []
|
|
|
|
|
39 |
if "is_estimation_data_created" not in st.session_state:
|
40 |
st.session_state["is_estimation_data_created"] = False
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
|
43 |
def main():
|
@@ -49,7 +57,7 @@ def main():
|
|
49 |
with st.sidebar:
|
50 |
menu_choice = option_menu(
|
51 |
menu_title="RFPStoryCraft",
|
52 |
-
options=["Home", "RFP Bot", "User Stories", "Summary", "Estimations"],
|
53 |
icons=["house", "list-task", "book", "book", "list-task"],
|
54 |
)
|
55 |
|
@@ -157,6 +165,42 @@ def main():
|
|
157 |
else:
|
158 |
st.warning("Plesase Process RFP Details to access this feature", icon="⚠️")
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
|
161 |
if __name__ == "__main__":
|
162 |
# if localStorage.getItem("email"):
|
|
|
36 |
st.session_state["rfp_summary"] = ""
|
37 |
if "estimation_data" not in st.session_state:
|
38 |
st.session_state["estimation_data"] = []
|
39 |
+
if "estimation_data_json" not in st.session_state:
|
40 |
+
st.session_state["estimation_data_json"] = {}
|
41 |
if "is_estimation_data_created" not in st.session_state:
|
42 |
st.session_state["is_estimation_data_created"] = False
|
43 |
+
if "roadmap_data" not in st.session_state:
|
44 |
+
st.session_state["roadmap_data"] = []
|
45 |
+
if "roadmap_data_json" not in st.session_state:
|
46 |
+
st.session_state["roadmap_data_json"] = []
|
47 |
+
if "is_roadmap_data_created" not in st.session_state:
|
48 |
+
st.session_state["is_roadmap_data_created"] = False
|
49 |
|
50 |
|
51 |
def main():
|
|
|
57 |
with st.sidebar:
|
58 |
menu_choice = option_menu(
|
59 |
menu_title="RFPStoryCraft",
|
60 |
+
options=["Home", "RFP Bot", "User Stories", "Summary", "Estimations","RoadMap"],
|
61 |
icons=["house", "list-task", "book", "book", "list-task"],
|
62 |
)
|
63 |
|
|
|
165 |
else:
|
166 |
st.warning("Plesase Process RFP Details to access this feature", icon="⚠️")
|
167 |
|
168 |
+
if menu_choice == "RoadMap":
|
169 |
+
if st.session_state["is_data_processed"] == True:
|
170 |
+
if st.session_state["is_estimation_data_created"] == True:
|
171 |
+
st.title("RoadMap")
|
172 |
+
st.button(
|
173 |
+
"Generate RoadMap", on_click=lambda: function.generate_roadmap()
|
174 |
+
)
|
175 |
+
|
176 |
+
if st.session_state["is_roadmap_data_created"] == True:
|
177 |
+
st.button(
|
178 |
+
"Export RoadMap",
|
179 |
+
on_click=lambda: export(st.session_state["roadmap_data"]),
|
180 |
+
)
|
181 |
+
if st.button("Generate Roadmap and Download"):
|
182 |
+
st.info("Generating roadmap... Please wait.")
|
183 |
+
# Generate the roadmap image
|
184 |
+
roadmap_image_data = generate_roadmap_image()
|
185 |
+
|
186 |
+
# Display the generated image
|
187 |
+
st.image(roadmap_image_data, caption='Project Roadmap', use_column_width=True)
|
188 |
+
|
189 |
+
# Provide a download link for the image
|
190 |
+
st.markdown(get_binary_file_downloader_html(roadmap_image_data, 'project_roadmap.png', 'Download Image'), unsafe_allow_html=True)
|
191 |
+
|
192 |
+
with st.container():
|
193 |
+
df = pd.DataFrame(st.session_state["roadmap_data"])
|
194 |
+
st.table(df)
|
195 |
+
|
196 |
+
else:
|
197 |
+
st.warning(
|
198 |
+
"Please Process the Estimations Data to access this feature",
|
199 |
+
icon="⚠️",
|
200 |
+
)
|
201 |
+
else:
|
202 |
+
st.warning("Plesase Process RFP Details to access this feature", icon="⚠️")
|
203 |
+
|
204 |
|
205 |
if __name__ == "__main__":
|
206 |
# if localStorage.getItem("email"):
|