Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -200,26 +200,26 @@ def generate_fallback_suggestions(reflection):
|
|
200 |
# Interface
|
201 |
def create_interface():
|
202 |
roles = get_roles_from_salesforce()
|
203 |
-
with gr.Blocks(theme="
|
204 |
-
gr.Markdown("## 🧠 AI-Powered Supervisor Assistant")
|
205 |
|
206 |
with gr.Row():
|
207 |
-
role = gr.Dropdown(choices=roles, label="Role")
|
208 |
-
supervisor_name = gr.Dropdown(choices=[], label="Supervisor Name")
|
209 |
-
project_id = gr.Textbox(label="Project ID", interactive=False)
|
210 |
|
211 |
-
milestones = gr.Textbox(label="Milestones (comma-separated KPIs)", placeholder="E.g. Safety training, daily inspection")
|
212 |
-
reflection = gr.Textbox(label="Reflection Log", lines=4, placeholder="Any concerns, delays, updates...")
|
213 |
|
214 |
with gr.Row():
|
215 |
-
generate = gr.Button("Generate")
|
216 |
-
clear = gr.Button("Clear")
|
217 |
-
refresh = gr.Button("🔄 Refresh Roles")
|
218 |
-
dashboard_btn = gr.Button("Dashboard")
|
219 |
|
220 |
-
checklist_output = gr.Textbox(label="✅ Daily Checklist")
|
221 |
-
suggestions_output = gr.Textbox(label="💡 Focus Suggestions")
|
222 |
-
dashboard_link = gr.HTML("")
|
223 |
|
224 |
role.change(fn=lambda r: gr.update(choices=get_supervisor_name_by_role(r)), inputs=role, outputs=supervisor_name)
|
225 |
supervisor_name.change(fn=get_projects_for_supervisor, inputs=supervisor_name, outputs=project_id)
|
@@ -240,5 +240,3 @@ def create_interface():
|
|
240 |
if __name__ == "__main__":
|
241 |
app = create_interface()
|
242 |
app.launch()
|
243 |
-
|
244 |
-
|
|
|
200 |
# Interface
|
201 |
def create_interface():
|
202 |
roles = get_roles_from_salesforce()
|
203 |
+
with gr.Blocks(theme="dark") as demo: # Change theme to dark for black background and white text
|
204 |
+
gr.Markdown("## 🧠 AI-Powered Supervisor Assistant", style="color:white;")
|
205 |
|
206 |
with gr.Row():
|
207 |
+
role = gr.Dropdown(choices=roles, label="Role", elem_id="role_dropdown", style="color:white;background-color:black;")
|
208 |
+
supervisor_name = gr.Dropdown(choices=[], label="Supervisor Name", elem_id="supervisor_dropdown", style="color:white;background-color:black;")
|
209 |
+
project_id = gr.Textbox(label="Project ID", interactive=False, style="color:white;background-color:black;")
|
210 |
|
211 |
+
milestones = gr.Textbox(label="Milestones (comma-separated KPIs)", placeholder="E.g. Safety training, daily inspection", style="color:white;background-color:black;")
|
212 |
+
reflection = gr.Textbox(label="Reflection Log", lines=4, placeholder="Any concerns, delays, updates...", style="color:white;background-color:black;")
|
213 |
|
214 |
with gr.Row():
|
215 |
+
generate = gr.Button("Generate", elem_id="generate_button", style="background-color:white; color:black;")
|
216 |
+
clear = gr.Button("Clear", elem_id="clear_button", style="background-color:white; color:black;")
|
217 |
+
refresh = gr.Button("🔄 Refresh Roles", elem_id="refresh_button", style="background-color:white; color:black;")
|
218 |
+
dashboard_btn = gr.Button("Dashboard", elem_id="dashboard_button", style="background-color:white; color:black;")
|
219 |
|
220 |
+
checklist_output = gr.Textbox(label="✅ Daily Checklist", style="color:white;background-color:black;")
|
221 |
+
suggestions_output = gr.Textbox(label="💡 Focus Suggestions", style="color:white;background-color:black;")
|
222 |
+
dashboard_link = gr.HTML("", style="color:white;")
|
223 |
|
224 |
role.change(fn=lambda r: gr.update(choices=get_supervisor_name_by_role(r)), inputs=role, outputs=supervisor_name)
|
225 |
supervisor_name.change(fn=get_projects_for_supervisor, inputs=supervisor_name, outputs=project_id)
|
|
|
240 |
if __name__ == "__main__":
|
241 |
app = create_interface()
|
242 |
app.launch()
|
|
|
|