Spaces:
Sleeping
Sleeping
COULIBALY BOURAHIMA commited on
Commit ·
785c15d
1
Parent(s): ac2f73d
termine
Browse files
App/functions_rupture/__pycache__/functions_gestion.cpython-311.pyc
CHANGED
|
Binary files a/App/functions_rupture/__pycache__/functions_gestion.cpython-311.pyc and b/App/functions_rupture/__pycache__/functions_gestion.cpython-311.pyc differ
|
|
|
App/utils/__pycache__/divers_function.cpython-311.pyc
CHANGED
|
Binary files a/App/utils/__pycache__/divers_function.cpython-311.pyc and b/App/utils/__pycache__/divers_function.cpython-311.pyc differ
|
|
|
App/utils/divers_function.py
CHANGED
|
@@ -145,4 +145,12 @@ def ajout_simularite(data) :
|
|
| 145 |
|
| 146 |
data["Cosinus similarité"] = data.apply(lambda row: cosine_similarity_between_expressions(row['ITEM_DESC_apres_clean'], row['ITEM_DESC_avant_clean']), axis=1)
|
| 147 |
|
| 148 |
-
return data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
|
| 146 |
data["Cosinus similarité"] = data.apply(lambda row: cosine_similarity_between_expressions(row['ITEM_DESC_apres_clean'], row['ITEM_DESC_avant_clean']), axis=1)
|
| 147 |
|
| 148 |
+
return data
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
def display_data_with_download_button(df, title="Data without decision-making"):
|
| 152 |
+
st.subheader(title)
|
| 153 |
+
df.loc[:, "Evaluation"] = True
|
| 154 |
+
edited_df = st.data_editor(df)
|
| 155 |
+
csv_data = convert_df(edited_df)
|
| 156 |
+
st.download_button(label="Download data as CSV", data=csv_data, file_name='sample_df.csv', mime='text/csv')
|
pages/🤖_Gestion_de_rupture_famille.py
CHANGED
|
@@ -79,16 +79,7 @@ def app():
|
|
| 79 |
class_id)
|
| 80 |
|
| 81 |
if show_proportion :
|
| 82 |
-
|
| 83 |
-
merged_final.loc[:, "Evaluation"]= True
|
| 84 |
-
merged_final = st.data_editor(merged_final)
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
csv = convert_df(merged_final)
|
| 88 |
-
st.download_button(label="Download data as CSV",
|
| 89 |
-
data=csv,
|
| 90 |
-
file_name='sample_df.csv',
|
| 91 |
-
mime='text/csv',)
|
| 92 |
|
| 93 |
data_countries_ratio = cond_pays_proportion(merged_final,
|
| 94 |
nb_countries,
|
|
|
|
| 79 |
class_id)
|
| 80 |
|
| 81 |
if show_proportion :
|
| 82 |
+
display_data_with_download_button(merged_final, title="Show data with ratios")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
data_countries_ratio = cond_pays_proportion(merged_final,
|
| 85 |
nb_countries,
|