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,3 +240,5 @@ def create_interface():
|
|
240 |
if __name__ == "__main__":
|
241 |
app = create_interface()
|
242 |
app.launch()
|
|
|
|
|
|
200 |
# Interface
|
201 |
def create_interface():
|
202 |
roles = get_roles_from_salesforce()
|
203 |
+
with gr.Blocks(theme="soft") as demo:
|
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 |
if __name__ == "__main__":
|
241 |
app = create_interface()
|
242 |
app.launch()
|
243 |
+
|
244 |
+
|