natasha1704 commited on
Commit
b1e1d6b
·
verified ·
1 Parent(s): b51b657

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -26
app.py CHANGED
@@ -79,37 +79,39 @@ def build_interface() -> gr.Blocks:
79
  # Left column – credential inputs
80
  # -----------------------------------------------------------------
81
  with gr.Column(scale=1):
82
- gr.Markdown("### Credentials")
83
- openai_key_box = gr.Textbox(
84
- label="OpenAI API Key",
85
- type="password",
86
- placeholder="sk‑…",
87
- )
88
- whoop_email_box = gr.Textbox(label="Whoop e‑mail", type="password")
89
- whoop_pass_box = gr.Textbox(label="Whoop password", type="password")
 
90
 
91
  # -----------------------------------------------------------------
92
  # Right column – chat interface
93
  # -----------------------------------------------------------------
94
  with gr.Column(scale=2):
95
- gr.Markdown("### Chat")
96
- question_box = gr.Textbox(
97
- label="Question",
98
- lines=3,
99
- placeholder="e.g. How has my sleep changed since starting Prozac last month?",
100
- )
101
- answer_box = gr.Textbox(label="Assistant", lines=8, interactive=False)
102
- ask_btn = gr.Button("Explore Insights", variant="primary")
103
- ask_btn.click(
104
- fn=answer_sync,
105
- inputs=[
106
- question_box,
107
- openai_key_box,
108
- whoop_email_box,
109
- whoop_pass_box,
110
- ],
111
- outputs=answer_box,
112
- )
 
113
 
114
  gr.Markdown(
115
  "---\nBuilt by [Natalia B.](https://www.linkedin.com/in/natalia-bobkova/), [Victoria L.](https://www.linkedin.com/in/victoria-latynina/)"
 
79
  # Left column – credential inputs
80
  # -----------------------------------------------------------------
81
  with gr.Column(scale=1):
82
+ with gr.Group(elem_id="credentials-box"):
83
+ gr.Markdown("### Credentials")
84
+ openai_key_box = gr.Textbox(
85
+ label="OpenAI API Key",
86
+ type="password",
87
+ placeholder="sk‑…",
88
+ )
89
+ whoop_email_box = gr.Textbox(label="Whoop e‑mail", type="password")
90
+ whoop_pass_box = gr.Textbox(label="Whoop password", type="password")
91
 
92
  # -----------------------------------------------------------------
93
  # Right column – chat interface
94
  # -----------------------------------------------------------------
95
  with gr.Column(scale=2):
96
+ with gr.Group(elem_id="chat-box"):
97
+ gr.Markdown("### Chat")
98
+ question_box = gr.Textbox(
99
+ label="Question",
100
+ lines=3,
101
+ placeholder="e.g. How has my sleep changed since starting Prozac last month?",
102
+ )
103
+ answer_box = gr.Textbox(label="Assistant", lines=8, interactive=False)
104
+ ask_btn = gr.Button("Explore Insights", variant="primary")
105
+ ask_btn.click(
106
+ fn=answer_sync,
107
+ inputs=[
108
+ question_box,
109
+ openai_key_box,
110
+ whoop_email_box,
111
+ whoop_pass_box,
112
+ ],
113
+ outputs=answer_box,
114
+ )
115
 
116
  gr.Markdown(
117
  "---\nBuilt by [Natalia B.](https://www.linkedin.com/in/natalia-bobkova/), [Victoria L.](https://www.linkedin.com/in/victoria-latynina/)"