AIEcosystem commited on
Commit
e109d3f
·
verified ·
1 Parent(s): 939f498

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +12 -8
src/streamlit_app.py CHANGED
@@ -79,18 +79,28 @@ st.markdown(
79
  expander = st.expander("**Important notes**")
80
  expander.write("""
81
  **How to Use the HR.ai web app:**
 
82
  1. Type or paste your text into the text area, then press Ctrl + Enter.
83
  2. Click the 'Results' button to extract and tag entities in your text data.
 
84
  Results are presented in easy-to-read tables, visualized in an interactive tree map, pie chart and bar chart, and are available for download along with a Glossary of tags.
 
85
  **How to Use the Question-Answering feature:**
 
86
  1. Type or paste your text into the text area, then press Ctrl + Enter.
87
  2. Click the 'Add Question' button to add your question to the Record of Questions. You can manage your questions by deleting them one by one.
88
  3. Click the 'Extract Answers' button to extract the answer to your question.
 
89
  Results are presented in an easy-to-read table, visualized in an interactive tree map, and is available for download.
 
90
  **Entities:** "Email", "Phone_number", "Street_address", "City", "Country", "Date_of_birth", "Marital_status", "Person", "Full_time", "Part_time", "Contract", "Terminated", "Retired", "Job_title", "Date", "Organization", "Role", "Performance_score", "Leave_of_absence", "Retirement_plan", "Bonus", "Stock_options", "Health_insurance", "Pay_rate", "Annual_salary", "Tax", "Deductions", "Interview_type", "Applicant", "Referral", "Job_board", "Recruiter", "Offer_letter", "Agreement", "Certification", "Skill"
 
91
  **Usage Limits:** You can request results unlimited times for one (1) month.
 
92
  **Supported Languages:** English
 
93
  **Technical issues:** If your connection times out, please refresh the page or reopen the app's URL.
 
94
  For any errors or inquiries, please contact us at info@nlpblogs.com""")
95
 
96
 
@@ -342,6 +352,7 @@ with tab2:
342
  df = df2.rename(columns={'label': 'question', 'text': 'answer'})
343
 
344
  st.subheader("Extracted Answers", divider="green")
 
345
  st.dataframe(df, use_container_width=True)
346
 
347
  st.subheader("Tree map", divider="green")
@@ -351,14 +362,7 @@ with tab2:
351
  fig_treemap.update_layout(margin=dict(t=50, l=25, r=25, b=25), paper_bgcolor='#F3E5F5', plot_bgcolor='#F3E5F5')
352
  st.plotly_chart(fig_treemap)
353
 
354
- csv_data = df.to_csv(index=False).encode('utf-8')
355
- st.download_button(
356
- label="Download CSV",
357
- data=csv_data,
358
- file_name="nlpblogs_questions_answers.csv",
359
- mime="text/csv",
360
- )
361
-
362
  if comet_initialized:
363
  experiment.log_metric("processing_time_seconds", elapsed_time)
364
  experiment.log_table("predicted_entities", df)
 
79
  expander = st.expander("**Important notes**")
80
  expander.write("""
81
  **How to Use the HR.ai web app:**
82
+
83
  1. Type or paste your text into the text area, then press Ctrl + Enter.
84
  2. Click the 'Results' button to extract and tag entities in your text data.
85
+
86
  Results are presented in easy-to-read tables, visualized in an interactive tree map, pie chart and bar chart, and are available for download along with a Glossary of tags.
87
+
88
  **How to Use the Question-Answering feature:**
89
+
90
  1. Type or paste your text into the text area, then press Ctrl + Enter.
91
  2. Click the 'Add Question' button to add your question to the Record of Questions. You can manage your questions by deleting them one by one.
92
  3. Click the 'Extract Answers' button to extract the answer to your question.
93
+
94
  Results are presented in an easy-to-read table, visualized in an interactive tree map, and is available for download.
95
+
96
  **Entities:** "Email", "Phone_number", "Street_address", "City", "Country", "Date_of_birth", "Marital_status", "Person", "Full_time", "Part_time", "Contract", "Terminated", "Retired", "Job_title", "Date", "Organization", "Role", "Performance_score", "Leave_of_absence", "Retirement_plan", "Bonus", "Stock_options", "Health_insurance", "Pay_rate", "Annual_salary", "Tax", "Deductions", "Interview_type", "Applicant", "Referral", "Job_board", "Recruiter", "Offer_letter", "Agreement", "Certification", "Skill"
97
+
98
  **Usage Limits:** You can request results unlimited times for one (1) month.
99
+
100
  **Supported Languages:** English
101
+
102
  **Technical issues:** If your connection times out, please refresh the page or reopen the app's URL.
103
+
104
  For any errors or inquiries, please contact us at info@nlpblogs.com""")
105
 
106
 
 
352
  df = df2.rename(columns={'label': 'question', 'text': 'answer'})
353
 
354
  st.subheader("Extracted Answers", divider="green")
355
+ st.write("To download the data, simply hover your cursor over the table. A download icon will appear on the right side.")
356
  st.dataframe(df, use_container_width=True)
357
 
358
  st.subheader("Tree map", divider="green")
 
362
  fig_treemap.update_layout(margin=dict(t=50, l=25, r=25, b=25), paper_bgcolor='#F3E5F5', plot_bgcolor='#F3E5F5')
363
  st.plotly_chart(fig_treemap)
364
 
365
+
 
 
 
 
 
 
 
366
  if comet_initialized:
367
  experiment.log_metric("processing_time_seconds", elapsed_time)
368
  experiment.log_table("predicted_entities", df)