Rupesh386 commited on
Commit
e67f338
·
verified ·
1 Parent(s): 2d3d664

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +17 -4
test.py CHANGED
@@ -78,10 +78,23 @@ class test :
78
  df['Age'] = age
79
 
80
  if st.sidebar.button("Submit"):
81
- st.write("Processing...")
82
- time.sleep(2)
83
- sys.stdout.flush()
84
- prediction = S_algo.predict(df)
 
 
 
 
 
 
 
 
 
 
 
 
 
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')