DILSHAD737 commited on
Commit
bc698a4
Β·
verified Β·
1 Parent(s): ebc808b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -194,7 +194,7 @@ def main():
194
  phrases_checked = 0
195
  total_paths_checked = 0
196
  total_matches = 0
197
- last_percentage_printed = -1 # βœ… Track last printed percentage
198
 
199
  print(f"πŸš€ Starting {NUM_WORKERS} workers on your Dual-Socket Xeon...\n")
200
 
@@ -210,17 +210,20 @@ def main():
210
  total_paths_checked += paths
211
 
212
  for match in matches:
213
- # βœ… Nayi line banayein match ke liye
214
  print(f"\n{match}")
215
  total_matches += 1
216
 
217
- # βœ… Sirf tab print karein jab percentage (integer) change ho
218
  current_pct = int((phrases_checked / total_phrases) * 100)
219
- if current_pct > last_percentage_printed:
220
- print(f"\r⏳ Scanning Progress: {current_pct}% ({phrases_checked}/{total_phrases})", end="", flush=True)
221
  last_percentage_printed = current_pct
222
 
223
- print("\n") # New line after progress bar
 
 
 
 
224
 
225
  except KeyboardInterrupt:
226
  print("\n\nπŸ›‘ Script ruk gayi (Ctrl+C).")
 
194
  phrases_checked = 0
195
  total_paths_checked = 0
196
  total_matches = 0
197
+ last_percentage_printed = -1
198
 
199
  print(f"πŸš€ Starting {NUM_WORKERS} workers on your Dual-Socket Xeon...\n")
200
 
 
210
  total_paths_checked += paths
211
 
212
  for match in matches:
 
213
  print(f"\n{match}")
214
  total_matches += 1
215
 
216
+ # βœ… Sirf 10% par progress print karein
217
  current_pct = int((phrases_checked / total_phrases) * 100)
218
+ if current_pct >= last_percentage_printed + 10:
219
+ print(f"⏳ Scanning Progress: {current_pct}% ({phrases_checked}/{total_phrases})")
220
  last_percentage_printed = current_pct
221
 
222
+ # Print 100% if it skipped due to loop limits
223
+ if last_percentage_printed < 100:
224
+ print(f"⏳ Scanning Progress: 100% ({phrases_checked}/{total_phrases})")
225
+
226
+ print()
227
 
228
  except KeyboardInterrupt:
229
  print("\n\nπŸ›‘ Script ruk gayi (Ctrl+C).")