DILSHAD737 commited on
Commit
939667f
·
1 Parent(s): 39e3827

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  import gradio as gr
2
  import hashlib, hmac, os, time, math, gc, random, threading
3
  from itertools import permutations, combinations
@@ -242,8 +248,7 @@ def run_scan(
242
  # ============================================================
243
  # Build UI
244
  # ============================================================
245
-
246
- with gr.Blocks(title="Phrase Scanner", theme=gr.themes.Soft()) as demo:
247
  gr.Markdown("""
248
  # 🔍 Phrase Scanner
249
  Random 12-word phrases generate karein aur address file se match karein.
@@ -311,4 +316,4 @@ with gr.Blocks(title="Phrase Scanner", theme=gr.themes.Soft()) as demo:
311
  )
312
 
313
  if __name__ == "__main__":
314
- demo.launch(theme=gr.themes.Soft(),ssr_mode=False, )
 
1
+ import asyncio
2
+ try:
3
+ asyncio.set_event_loop(asyncio.new_event_loop())
4
+ except Exception:
5
+ pass
6
+
7
  import gradio as gr
8
  import hashlib, hmac, os, time, math, gc, random, threading
9
  from itertools import permutations, combinations
 
248
  # ============================================================
249
  # Build UI
250
  # ============================================================
251
+ with gr.Blocks(title="Phrase Scanner") as demo:
 
252
  gr.Markdown("""
253
  # 🔍 Phrase Scanner
254
  Random 12-word phrases generate karein aur address file se match karein.
 
316
  )
317
 
318
  if __name__ == "__main__":
319
+ demo.launch(server_name="0.0.0.0",server_port=7860,theme=gr.themes.Soft(),ssr_mode=False,prevent_thread_lock=True)