DILSHAD737 commited on
Commit
dbec292
Β·
1 Parent(s): 6774b13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -20
app.py CHANGED
@@ -129,7 +129,7 @@ def generate_phrases_for_words(wordlist, mode):
129
  yield " ".join(combo)
130
 
131
  # ============================================================
132
- # Scan Function WITH Progress Bar
133
  # ============================================================
134
 
135
  def run_scan(my_phrase, num_phrases, addresses_file, phrase_mode,
@@ -142,7 +142,7 @@ def run_scan(my_phrase, num_phrases, addresses_file, phrase_mode,
142
  start_index = int(start_index)
143
  end_index = int(end_index)
144
 
145
- progress(0, desc="Addresses load ho rahe hain...")
146
  try:
147
  known = load_addresses_cached(addresses_file)
148
  except Exception as e:
@@ -209,29 +209,25 @@ def run_scan(my_phrase, num_phrases, addresses_file, phrase_mode,
209
  return log_text, matches_text
210
 
211
  # ============================================================
212
- # Simple, Flat UI (No Layout Bugs)
213
  # ============================================================
214
- with gr.Blocks(title="Phrase Scanner") as demo:
215
  gr.Markdown("# πŸ” Phrase Scanner")
216
 
217
- with gr.Row():
218
- my_phrase = gr.Textbox(
219
- label="πŸ”‘ Apni Phrase (optional)",
220
- value="lesson cushion crane affair federal decline limb spend reunion chief cart zebra",
221
- lines=2,
222
- )
223
 
224
- with gr.Row():
225
- num_phrases = gr.Number(label="Kitni Random Phrases Check Karein?", value=10, precision=0, minimum=0)
226
- addresses_file = gr.Textbox(label="Addresses File", value="12730802_addresses.csv")
227
 
228
- with gr.Row():
229
- phrase_mode = gr.Radio(choices=["replace", "order", "subset"], value="replace", label="Phrase Mode")
230
- start_index = gr.Number(label="Start Index", value=0, precision=0, minimum=0)
231
- end_index = gr.Number(label="End Index", value=20, precision=0, minimum=0)
232
 
233
- with gr.Row():
234
- passphrase = gr.Textbox(label="BIP39 Passphrase (khali chhod dein)", value="", type="password")
235
 
236
  run_btn = gr.Button("πŸš€ Scan Shuru Karein", variant="primary")
237
 
@@ -246,7 +242,6 @@ with gr.Blocks(title="Phrase Scanner") as demo:
246
  inputs=[my_phrase, num_phrases, addresses_file, phrase_mode,
247
  start_index, end_index, passphrase],
248
  outputs=[log_output, matches_output],
249
- show_progress="full"
250
  )
251
 
252
  # ZeroGPU requirement
 
129
  yield " ".join(combo)
130
 
131
  # ============================================================
132
+ # Scan Function
133
  # ============================================================
134
 
135
  def run_scan(my_phrase, num_phrases, addresses_file, phrase_mode,
 
142
  start_index = int(start_index)
143
  end_index = int(end_index)
144
 
145
+ progress(0, desc="Loading addresses...")
146
  try:
147
  known = load_addresses_cached(addresses_file)
148
  except Exception as e:
 
209
  return log_text, matches_text
210
 
211
  # ============================================================
212
+ # Bulletproof UI
213
  # ============================================================
214
+ with gr.Blocks() as demo:
215
  gr.Markdown("# πŸ” Phrase Scanner")
216
 
217
+ my_phrase = gr.Textbox(
218
+ label="πŸ”‘ Apni Phrase (optional)",
219
+ value="lesson cushion crane affair federal decline limb spend reunion chief cart zebra",
220
+ lines=2,
221
+ )
 
222
 
223
+ num_phrases = gr.Number(label="Kitni Random Phrases Check Karein?", value=10, precision=0, minimum=0)
224
+ addresses_file = gr.Textbox(label="Addresses File", value="12730802_addresses.csv")
 
225
 
226
+ phrase_mode = gr.Radio(choices=["replace", "order", "subset"], value="replace", label="Phrase Mode")
227
+ start_index = gr.Number(label="Start Index", value=0, precision=0, minimum=0)
228
+ end_index = gr.Number(label="End Index", value=20, precision=0, minimum=0)
 
229
 
230
+ passphrase = gr.Textbox(label="BIP39 Passphrase (khali chhod dein)", value="", type="password")
 
231
 
232
  run_btn = gr.Button("πŸš€ Scan Shuru Karein", variant="primary")
233
 
 
242
  inputs=[my_phrase, num_phrases, addresses_file, phrase_mode,
243
  start_index, end_index, passphrase],
244
  outputs=[log_output, matches_output],
 
245
  )
246
 
247
  # ZeroGPU requirement