Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,13 +28,11 @@ if xl1 is not None :
|
|
28 |
new_df = new_df.sort_values(by="dict len", ascending=False)
|
29 |
new_df.reset_index(inplace=True)
|
30 |
#new_df = new_df.drop("dict len", axis=1)
|
31 |
-
st.write(new_df)
|
32 |
with st.form("First excel file"):
|
33 |
choices = []
|
34 |
i = 0
|
35 |
-
if new_df.shape[0]
|
36 |
-
num_kp = new_df.shape[0]
|
37 |
-
st.write(num_kp)
|
38 |
for t1 in new_df.sample(n=num_kp,random_state=42).iterrows():
|
39 |
#for t1 in new_df.sample(n=10, random_state=42).iterrows():
|
40 |
r1 = t1[1]
|
|
|
28 |
new_df = new_df.sort_values(by="dict len", ascending=False)
|
29 |
new_df.reset_index(inplace=True)
|
30 |
#new_df = new_df.drop("dict len", axis=1)
|
|
|
31 |
with st.form("First excel file"):
|
32 |
choices = []
|
33 |
i = 0
|
34 |
+
if num_kp > new_df.shape[0] :
|
35 |
+
num_kp = new_df.shape[0]
|
|
|
36 |
for t1 in new_df.sample(n=num_kp,random_state=42).iterrows():
|
37 |
#for t1 in new_df.sample(n=10, random_state=42).iterrows():
|
38 |
r1 = t1[1]
|