gkdivya commited on
Commit
62f81ec
·
verified ·
1 Parent(s): ccb7521

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py CHANGED
@@ -182,6 +182,25 @@ with gr.Blocks(title="State School Fuzzy Matcher (with gated Admin)") as demo:
182
  outputs=[candidates_table, best_table],
183
  )
184
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  # ---------------- Admin gating ----------------
186
  def try_unlock(pwd: str):
187
  if ADMIN_PASSWORD is None:
 
182
  outputs=[candidates_table, best_table],
183
  )
184
 
185
+ # ensure at top of file you have: from web_search import tavily_search
186
+
187
+ # --- inside Search tab UI, after search_btn etc. ---
188
+ gr.Markdown("### Web search — find UDISE codes on the web")
189
+ gr.Markdown("### Use Judiciously - Only if you didnt find or couldnt confirm the school in the above list")
190
+ search_web_btn = gr.Button("Search Web")
191
+
192
+ web_schools_table = gr.Dataframe(
193
+ headers=["School_Name", "State", "District", "Block", "UDISE_Code"],
194
+ datatype=["str", "str", "str", "str", "str"],
195
+ interactive=False
196
+ )
197
+
198
+ search_web_btn.click(
199
+ fn=on_search_web,
200
+ inputs=[school_input, state_dd, district_dd, block_dd],
201
+ outputs=[web_schools_table]
202
+ )
203
+
204
  # ---------------- Admin gating ----------------
205
  def try_unlock(pwd: str):
206
  if ADMIN_PASSWORD is None: