Spaces:
Sleeping
Sleeping
ITSAIDI
commited on
Commit
•
745dfe3
1
Parent(s):
51113c2
gg
Browse files
App.py
CHANGED
@@ -33,32 +33,27 @@ if uploaded_file is not None:
|
|
33 |
text_InvDate = st.sidebar.text_input("Date Facture", value=Results["Date Facture"])
|
34 |
text_InvNum = st.sidebar.text_input("Numéro de facture", value=Results["Numéro de facture"])
|
35 |
text_TT = st.sidebar.text_input("Total HT", value=Results["Total HT"])
|
36 |
-
|
37 |
-
|
38 |
|
39 |
st.write("Predicted Text:", text_fourni, text_InvDate, text_InvNum, text_TT, text_TVA, text_TTC)
|
40 |
|
41 |
-
|
42 |
-
if check_if_changed(Results, {
|
43 |
"Fournisseur": text_fourni,
|
44 |
"Date Facture": text_InvDate,
|
45 |
"Numéro de facture": text_InvNum,
|
46 |
"Total HT": text_TT,
|
47 |
"TVA": text_TVA,
|
48 |
-
"TTC": text_TTC
|
49 |
-
}
|
|
|
|
|
|
|
|
|
50 |
# Add a button to save changes
|
51 |
-
|
52 |
# Get updated values from text inputs
|
53 |
-
updated_results =
|
54 |
-
"Fournisseur": text_fourni,
|
55 |
-
"Date Facture": text_InvDate,
|
56 |
-
"Numéro de facture": text_InvNum,
|
57 |
-
"Total HT": text_TT,
|
58 |
-
"TVA": text_TVA,
|
59 |
-
"TTC": text_TTC
|
60 |
-
}
|
61 |
-
|
62 |
success_message = st.sidebar.empty()
|
63 |
success_message.success("Les résultats ont été sauvegardés avec succès !")
|
64 |
time.sleep(1)
|
|
|
33 |
text_InvDate = st.sidebar.text_input("Date Facture", value=Results["Date Facture"])
|
34 |
text_InvNum = st.sidebar.text_input("Numéro de facture", value=Results["Numéro de facture"])
|
35 |
text_TT = st.sidebar.text_input("Total HT", value=Results["Total HT"])
|
36 |
+
text_TTC = st.sidebar.text_input("TTC", value=Results["Total TTC"])
|
37 |
+
text_TVA = st.sidebar.text_input("TVA", value=Results["TVA"])
|
38 |
|
39 |
st.write("Predicted Text:", text_fourni, text_InvDate, text_InvNum, text_TT, text_TVA, text_TTC)
|
40 |
|
41 |
+
New_results = {
|
|
|
42 |
"Fournisseur": text_fourni,
|
43 |
"Date Facture": text_InvDate,
|
44 |
"Numéro de facture": text_InvNum,
|
45 |
"Total HT": text_TT,
|
46 |
"TVA": text_TVA,
|
47 |
+
"Total TTC": text_TTC
|
48 |
+
}
|
49 |
+
|
50 |
+
# Check if any input has been changed
|
51 |
+
if check_if_changed(Results,New_results):
|
52 |
+
st.write(check_if_changed(Results,New_results))
|
53 |
# Add a button to save changes
|
54 |
+
if st.sidebar.button("Sauvegarder"):
|
55 |
# Get updated values from text inputs
|
56 |
+
updated_results = New_results
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
success_message = st.sidebar.empty()
|
58 |
success_message.success("Les résultats ont été sauvegardés avec succès !")
|
59 |
time.sleep(1)
|