Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,7 +48,7 @@ def generate_summary(date_str):
|
|
| 48 |
# === Tab 2: KAMs ===
|
| 49 |
def get_reps(date_str):
|
| 50 |
reps = df[df['Date'] == date_str]['Rep Name'].dropna().unique()
|
| 51 |
-
return sorted(reps)
|
| 52 |
|
| 53 |
def show_map(date_str, rep):
|
| 54 |
subset = df[(df['Date'] == date_str) & (df['Rep Name'] == rep)]
|
|
@@ -93,7 +93,7 @@ def show_map(date_str, rep):
|
|
| 93 |
fig.update_layout(mapbox_style="open-street-map", title=f"📍 {rep}'s Route on {date_str}")
|
| 94 |
|
| 95 |
# Final table (without photo)
|
| 96 |
-
table = subset[[
|
| 97 |
'Visit Order', 'Dealership Name', 'Time', 'Time Diff (min)',
|
| 98 |
'Type of call', 'Sales or service'
|
| 99 |
]].rename(columns={
|
|
|
|
| 48 |
# === Tab 2: KAMs ===
|
| 49 |
def get_reps(date_str):
|
| 50 |
reps = df[df['Date'] == date_str]['Rep Name'].dropna().unique()
|
| 51 |
+
return gr.update(choices=sorted(reps))
|
| 52 |
|
| 53 |
def show_map(date_str, rep):
|
| 54 |
subset = df[(df['Date'] == date_str) & (df['Rep Name'] == rep)]
|
|
|
|
| 93 |
fig.update_layout(mapbox_style="open-street-map", title=f"📍 {rep}'s Route on {date_str}")
|
| 94 |
|
| 95 |
# Final table (without photo)
|
| 96 |
+
table = subset[[
|
| 97 |
'Visit Order', 'Dealership Name', 'Time', 'Time Diff (min)',
|
| 98 |
'Type of call', 'Sales or service'
|
| 99 |
]].rename(columns={
|