Spaces:
Sleeping
Sleeping
COULIBALY BOURAHIMA
commited on
Commit
•
677a6d1
1
Parent(s):
2749be6
separateur
Browse files
App/class_input_box/__pycache__/input_box.cpython-311.pyc
CHANGED
Binary files a/App/class_input_box/__pycache__/input_box.cpython-311.pyc and b/App/class_input_box/__pycache__/input_box.cpython-311.pyc differ
|
|
App/class_input_box/input_box.py
CHANGED
@@ -11,18 +11,24 @@ class InputsBox:
|
|
11 |
self.class_id = None
|
12 |
|
13 |
def get_data(self):
|
14 |
-
uploaded_file = st.file_uploader("Choose a CSV file", type=["csv"
|
15 |
|
16 |
if uploaded_file is not None:
|
17 |
try:
|
18 |
-
self.data = pd.read_csv(uploaded_file,
|
|
|
19 |
except:
|
20 |
-
|
21 |
-
|
22 |
-
self.
|
|
|
|
|
|
|
23 |
|
24 |
return self.data
|
25 |
|
|
|
|
|
26 |
def valid_produict_id(self) -> int:
|
27 |
min_len = st.number_input("Minimum len of product_id", max_value= 25, min_value=1, value= 2, key = "pp")
|
28 |
return min_len
|
|
|
11 |
self.class_id = None
|
12 |
|
13 |
def get_data(self):
|
14 |
+
uploaded_file = st.file_uploader("Choose a CSV file with the separator ';' ", type=["csv"])
|
15 |
|
16 |
if uploaded_file is not None:
|
17 |
try:
|
18 |
+
self.data = pd.read_csv(uploaded_file,dtype=str, sep=";")
|
19 |
+
self.columns = self.data.columns.tolist()
|
20 |
except:
|
21 |
+
pass
|
22 |
+
|
23 |
+
if self.data is None:
|
24 |
+
st.error("Error: The CSV fileis empty.")
|
25 |
+
else:
|
26 |
+
self.columns = self.data.columns.tolist()
|
27 |
|
28 |
return self.data
|
29 |
|
30 |
+
|
31 |
+
|
32 |
def valid_produict_id(self) -> int:
|
33 |
min_len = st.number_input("Minimum len of product_id", max_value= 25, min_value=1, value= 2, key = "pp")
|
34 |
return min_len
|
requirements.txt
CHANGED
@@ -8,4 +8,5 @@ nltk
|
|
8 |
bcrypt
|
9 |
regex
|
10 |
joblib
|
11 |
-
scikit-learn
|
|
|
|
8 |
bcrypt
|
9 |
regex
|
10 |
joblib
|
11 |
+
scikit-learn
|
12 |
+
openpyxl==3.1.2
|