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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -47
app.py CHANGED
@@ -42,25 +42,6 @@ def build_interface() -> gr.Blocks:
42
  * {
43
  font-family: 'Nunito', sans-serif;
44
  }
45
-
46
- /* Set the background for the credentials and chat sections */
47
- #credentials-box, #chat-box {
48
- background-color: #36c4e4;
49
- padding: 20px;
50
- border-radius: 12px;
51
- }
52
-
53
- /* Make the button dark blue */
54
- .gr-button-primary {
55
- background-color: #0b65b3 !important;
56
- color: white !important;
57
- border: none !important;
58
- border-radius: 6px;
59
- }
60
-
61
- .gr-button-primary:hover {
62
- background-color: #094e91 !important;
63
- }
64
  """
65
 
66
  with gr.Blocks(title="WellBe+ Assistant", css=custom_css) as app:
@@ -79,39 +60,37 @@ def build_interface() -> gr.Blocks:
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/)"
 
42
  * {
43
  font-family: 'Nunito', sans-serif;
44
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  """
46
 
47
  with gr.Blocks(title="WellBe+ Assistant", css=custom_css) as app:
 
60
  # Left column – credential inputs
61
  # -----------------------------------------------------------------
62
  with gr.Column(scale=1):
63
+ gr.Markdown("### Credentials")
64
+ openai_key_box = gr.Textbox(
65
+ label="OpenAI API Key",
66
+ type="password",
67
+ placeholder="sk‑…",
68
+ )
69
+ whoop_email_box = gr.Textbox(label="Whoop e‑mail", type="password")
70
+ whoop_pass_box = gr.Textbox(label="Whoop password", type="password")
 
71
 
72
  # -----------------------------------------------------------------
73
  # Right column – chat interface
74
  # -----------------------------------------------------------------
75
  with gr.Column(scale=2):
76
+ gr.Markdown("### Chat")
77
+ question_box = gr.Textbox(
78
+ label="Question",
79
+ lines=3,
80
+ placeholder="e.g. How has my sleep changed since starting Prozac last month?",
81
+ )
82
+ answer_box = gr.Textbox(label="Assistant", lines=8, interactive=False)
83
+ ask_btn = gr.Button("Explore Insights", variant="primary")
84
+ ask_btn.click(
85
+ fn=answer_sync,
86
+ inputs=[
87
+ question_box,
88
+ openai_key_box,
89
+ whoop_email_box,
90
+ whoop_pass_box,
91
+ ],
92
+ outputs=answer_box,
93
+ )
 
94
 
95
  gr.Markdown(
96
  "---\nBuilt by [Natalia B.](https://www.linkedin.com/in/natalia-bobkova/), [Victoria L.](https://www.linkedin.com/in/victoria-latynina/)"