GuglielmoTor commited on
Commit
e1e0cc1
·
verified ·
1 Parent(s): 506f1ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -6,7 +6,7 @@ from Data_Fetching_&_Rendering import fetch_org_urn
6
  token_received = {"status": False, "token": "", "client_id": ""}
7
 
8
  # 1) this will be called by POST
9
- def receive_token(accessToken: str, client_id: str):
10
  token_received["status"] = True
11
  token_received["token"] = accessToken
12
  token_received["client_id"] = client_id
@@ -44,9 +44,14 @@ with gr.Blocks() as demo:
44
  refresh = gr.Button("Refresh").click(fn=check_status, outputs=status_box)
45
  reset = gr.Button("Reset Status").click(fn=reset_status, outputs=[status_box, token_display, client_id_display])
46
 
 
 
 
 
47
  # ✅ Correct usage of Timer
48
  timer = gr.Timer(1.0)
49
  timer.tick(fn=show_token, outputs=token_display)
50
  timer.tick(fn=show_client_id, outputs=client_id_display)
 
51
 
52
  demo.launch(server_name="0.0.0.0", server_port=7860)
 
6
  token_received = {"status": False, "token": "", "client_id": ""}
7
 
8
  # 1) this will be called by POST
9
+ def receive_token(accessToken: dict, client_id: str):
10
  token_received["status"] = True
11
  token_received["token"] = accessToken
12
  token_received["client_id"] = client_id
 
44
  refresh = gr.Button("Refresh").click(fn=check_status, outputs=status_box)
45
  reset = gr.Button("Reset Status").click(fn=reset_status, outputs=[status_box, token_display, client_id_display])
46
 
47
+ with gr.Row():
48
+ urn_display = gr.Textbox(value=urn, interactive=False)
49
+ name_display = gr.Textbox(value=name, interactive=False)
50
+
51
  # ✅ Correct usage of Timer
52
  timer = gr.Timer(1.0)
53
  timer.tick(fn=show_token, outputs=token_display)
54
  timer.tick(fn=show_client_id, outputs=client_id_display)
55
+ timer.tick(outputs=urn_display)
56
 
57
  demo.launch(server_name="0.0.0.0", server_port=7860)