Update test.py
Browse files
test.py
CHANGED
|
@@ -78,10 +78,23 @@ class test :
|
|
| 78 |
df['Age'] = age
|
| 79 |
|
| 80 |
if st.sidebar.button("Submit"):
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
if prediction==1:
|
| 86 |
|
| 87 |
st.write('Output : Occasional Users')
|
|
|
|
| 78 |
df['Age'] = age
|
| 79 |
|
| 80 |
if st.sidebar.button("Submit"):
|
| 81 |
+
for _ in range(3): # Print 'Processing' for 3 seconds
|
| 82 |
+
sys.stdout.write("\rProcessing") # Print 'Processing' without a newline
|
| 83 |
+
sys.stdout.flush()
|
| 84 |
+
time.sleep(1)
|
| 85 |
+
sys.stdout.write("\rProcessing.") # Add dot for progress
|
| 86 |
+
sys.stdout.flush()
|
| 87 |
+
time.sleep(1)
|
| 88 |
+
sys.stdout.write("\rProcessing..") # Add second dot for progress
|
| 89 |
+
sys.stdout.flush()
|
| 90 |
+
time.sleep(1)
|
| 91 |
+
sys.stdout.write("\rProcessing...") # Add third dot for progress
|
| 92 |
+
sys.stdout.flush()
|
| 93 |
+
time.sleep(1)
|
| 94 |
+
|
| 95 |
+
sys.stdout.write("\r ") # Clear the 'Processing' message
|
| 96 |
+
sys.stdout.flush()
|
| 97 |
+
prediction = S_algo.predict(df)
|
| 98 |
if prediction==1:
|
| 99 |
|
| 100 |
st.write('Output : Occasional Users')
|