Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -172,6 +172,15 @@ def main():
|
|
| 172 |
pred_val = [list_pred[i] for i in pred1]
|
| 173 |
|
| 174 |
#print('count',count)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
|
| 176 |
sent_id, unique = pd.factorize(sentence_pred)
|
| 177 |
|
|
@@ -521,8 +530,8 @@ def main():
|
|
| 521 |
|
| 522 |
|
| 523 |
|
| 524 |
-
st.download_button(label="Download the detailed result table_csv",data=csv1,file_name='results.csv',mime='text/csv')
|
| 525 |
-
|
| 526 |
|
| 527 |
#st.download_button(label="Download the detailed result table",data=buffer,file_name="df_final.xlsx",mime="application/vnd.ms-excel")
|
| 528 |
st.download_button(label="Download the result table",data=buffer,file_name="df_tab.xlsx",mime="application/vnd.ms-excel")
|
|
|
|
| 172 |
pred_val = [list_pred[i] for i in pred1]
|
| 173 |
|
| 174 |
#print('count',count)
|
| 175 |
+
for find,(sent,preds) in enumerate(zip(class_list,pred_val)):
|
| 176 |
+
if 'customers' in sent or 'client' in sent or 'consumer' in sent or 'user' in sent:
|
| 177 |
+
pred_val[ind] = 'Customers'
|
| 178 |
+
elif 'investor' in sent or 'finance' in sent or 'shareholder' in sent or 'stockholder' in sent or 'owners' in sent:
|
| 179 |
+
pred_val[ind] = 'Investors'
|
| 180 |
+
elif 'employee' in sent or 'worker' in sent or 'staff' in sent:
|
| 181 |
+
pred_val[ind] = 'Employees'
|
| 182 |
+
elif 'society' in sent or 'societal' in sent or 'social responsib' in sent or 'social performance' in sent or 'communit' in sent:
|
| 183 |
+
pred_val[ind] = 'Society'
|
| 184 |
|
| 185 |
sent_id, unique = pd.factorize(sentence_pred)
|
| 186 |
|
|
|
|
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
+
#st.download_button(label="Download the detailed result table_csv",data=csv1,file_name='results.csv',mime='text/csv')
|
| 534 |
+
# st.download_button(label="Download the result table_csv",data=csv2,file_name='final_data.csv',mime='text/csv')
|
| 535 |
|
| 536 |
#st.download_button(label="Download the detailed result table",data=buffer,file_name="df_final.xlsx",mime="application/vnd.ms-excel")
|
| 537 |
st.download_button(label="Download the result table",data=buffer,file_name="df_tab.xlsx",mime="application/vnd.ms-excel")
|