Spaces:
Running
Running
Subhajit Chakraborty
commited on
Commit
·
43b8a79
1
Parent(s):
a49b078
update app.py(4)
Browse files- src/app.py +42 -35
src/app.py
CHANGED
|
@@ -65,42 +65,49 @@ if st.session_state.page == "Dashboard":
|
|
| 65 |
st.header("Welcome!!")
|
| 66 |
st.text("Here you will find all about your leads.")
|
| 67 |
if st.session_state.data_enhancement == True:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
st.subheader("
|
| 82 |
-
st.plotly_chart(
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
|
| 106 |
if st.session_state.page == "Enrich Companies":
|
|
|
|
| 65 |
st.header("Welcome!!")
|
| 66 |
st.text("Here you will find all about your leads.")
|
| 67 |
if st.session_state.data_enhancement == True:
|
| 68 |
+
main_lead_info_file = "data/all_cleaned_companies.json"
|
| 69 |
+
if os.path.isdir(main_lead_info_file):
|
| 70 |
+
fig_ind, fig_coun, fig_btype, fig_rev = chart_data.create_chart("data/all_cleaned_companies.json")
|
| 71 |
+
col1, col2, col3 = st.columns(3)
|
| 72 |
|
| 73 |
+
with col1:
|
| 74 |
+
st.subheader("Industry-wise Distribution")
|
| 75 |
+
st.plotly_chart(fig_ind, use_container_width=True)
|
| 76 |
+
|
| 77 |
+
with col2:
|
| 78 |
+
st.subheader("Country-wise Distribution")
|
| 79 |
+
st.plotly_chart(fig_coun, use_container_width=True)
|
| 80 |
+
|
| 81 |
+
with col3:
|
| 82 |
+
st.subheader("Business type-wise Distribution")
|
| 83 |
+
st.plotly_chart(fig_btype, use_container_width=True)
|
| 84 |
+
|
| 85 |
+
st.subheader("Revenue-based Distribution")
|
| 86 |
+
st.plotly_chart(fig_rev, use_container_width=True)
|
| 87 |
+
else:
|
| 88 |
+
st.subheader("Do Data Enhancement first in order to view the diagramatic details!!")
|
| 89 |
+
if os.path.isdir(main_lead_info_file):
|
| 90 |
+
df_display = chart_data.df_creator_from_json_and_process("data/all_cleaned_companies.json").sort_values(by="score", ascending=False).rename(columns={
|
| 91 |
+
"company_name": "Company Name",
|
| 92 |
+
"key_industry": "Industry Type",
|
| 93 |
+
"industry_type": "Speciality",
|
| 94 |
+
"street": "Street",
|
| 95 |
+
"city": "City",
|
| 96 |
+
"state": "State",
|
| 97 |
+
"country": "Country",
|
| 98 |
+
"phone": "Phone",
|
| 99 |
+
"email": "Email",
|
| 100 |
+
"company_size": "Number of Employees",
|
| 101 |
+
"approx_revenue": "Revenue",
|
| 102 |
+
"business_type": "Business Type",
|
| 103 |
+
"website_url": "Website",
|
| 104 |
+
"country": "Country"
|
| 105 |
+
})
|
| 106 |
+
st.subheader("All Company Details")
|
| 107 |
+
st.dataframe(df_display)
|
| 108 |
+
else:
|
| 109 |
+
# st.subheader("All Company Details")
|
| 110 |
+
st.write("_There are no leads yet.Go to Data Enrichment to create leads!!_")
|
| 111 |
|
| 112 |
|
| 113 |
if st.session_state.page == "Enrich Companies":
|