victoria-latynina commited on
Commit
314f900
Β·
verified Β·
1 Parent(s): 7c1d41e

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -35
app.py DELETED
@@ -1,35 +0,0 @@
1
- with gr.Blocks(title="Whoop API Explorer") as demo:
2
- gr.Markdown("# 🧠 WHOOP API Dashboard")
3
- gr.Markdown("Easily authenticate and explore your WHOOP recovery and strain data.")
4
-
5
- with gr.Group():
6
- gr.Markdown("## πŸ” Authentication")
7
- with gr.Row():
8
- email_input = gr.Textbox(label="WHOOP Email", placeholder="[email protected]")
9
- password_input = gr.Textbox(label="WHOOP Password", type="password", placeholder="β€’β€’β€’β€’β€’β€’β€’β€’")
10
- auth_button = gr.Button("Authenticate")
11
- auth_output = gr.Label(label="Auth Status")
12
-
13
- with gr.Group():
14
- gr.Markdown("## πŸ” Latest Recovery Cycle")
15
- cycle_button = gr.Button("Fetch Latest Cycle")
16
- latest_recovery = gr.Label(label="Recovery Score")
17
- cycle_details = gr.Textbox(label="Full Cycle Data", visible=False, lines=6)
18
-
19
- with gr.Group():
20
- gr.Markdown("## πŸ“Š Strain Insights")
21
- with gr.Row():
22
- days_input = gr.Number(value=7, label="Number of Days", precision=0)
23
- strain_button = gr.Button("Calculate Average Strain")
24
- average_strain = gr.Label(label="Average Strain")
25
-
26
- with gr.Group():
27
- gr.Markdown("## πŸ‘€ WHOOP Profile")
28
- status_button = gr.Button("Check Profile")
29
- status_output = gr.Textbox(label="Profile Info", lines=3, interactive=False)
30
-
31
- # Bind actions
32
- auth_button.click(fn=initialize_whoop_client_with_input, inputs=[email_input, password_input], outputs=auth_output)
33
- cycle_button.click(fn=lambda: format_latest_cycle(get_latest_cycle_gr()), outputs=[latest_recovery, cycle_details])
34
- strain_button.click(fn=get_average_strain_gr, inputs=days_input, outputs=average_strain)
35
- status_button.click(fn=get_auth_status_gr, outputs=status_output)