Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
| 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
|
| 218 |
current_pct = int((phrases_checked / total_phrases) * 100)
|
| 219 |
-
if current_pct > last_percentage_printed:
|
| 220 |
-
print(f"
|
| 221 |
last_percentage_printed = current_pct
|
| 222 |
|
| 223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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).")
|