svhozt commited on
Commit
9021c09
·
1 Parent(s): 96eda8c

Fix urllib

Browse files
Files changed (1) hide show
  1. gps.py +7 -9
gps.py CHANGED
@@ -85,30 +85,28 @@ def process_imei_batches(user_id, password):
85
  logs.append(remove_processed_imeis(processed_imeis))
86
 
87
  logs.append("\nPress the button to proceed with the next 20 IMEIs after changing SIM cards.")
88
- return logs
89
 
90
- return logs
91
 
92
  # Gradio UI function
93
  def start_imei_processing(user_id, password):
94
  if not user_id or not password:
95
  return "Error: Please enter both User ID and Password."
96
 
97
- logs = process_imei_batches(user_id, password)
98
- return "\n".join(logs)
99
 
100
- # Gradio interface with a submit button
101
  iface = gr.Interface(
102
  fn=start_imei_processing,
103
  inputs=[
104
  gr.Textbox(label="User ID (Phone Number in International Format)", type="text"),
105
- gr.Textbox(label="Password (4-digit)", type="password"),
106
- gr.Button("Start Processing")
107
  ],
108
  outputs="text",
109
  title="GPS Tracker IMEI Writer",
110
- description="Enter your User ID and Password to start processing IMEI numbers.",
111
- live=False # Prevent real-time execution; button click triggers processing
112
  )
113
 
114
  iface.launch(share=True)
 
85
  logs.append(remove_processed_imeis(processed_imeis))
86
 
87
  logs.append("\nPress the button to proceed with the next 20 IMEIs after changing SIM cards.")
88
+ break
89
 
90
+ return "\n".join(logs)
91
 
92
  # Gradio UI function
93
  def start_imei_processing(user_id, password):
94
  if not user_id or not password:
95
  return "Error: Please enter both User ID and Password."
96
 
97
+ return process_imei_batches(user_id, password)
 
98
 
99
+ # Gradio interface with submit button
100
  iface = gr.Interface(
101
  fn=start_imei_processing,
102
  inputs=[
103
  gr.Textbox(label="User ID (Phone Number in International Format)", type="text"),
104
+ gr.Textbox(label="Password (4-digit)", type="password")
 
105
  ],
106
  outputs="text",
107
  title="GPS Tracker IMEI Writer",
108
+ description="Enter your User ID and Password to start processing IMEI numbers. Click the button below to proceed.",
109
+ allow_flagging="never"
110
  )
111
 
112
  iface.launch(share=True)