Spaces:
Sleeping
Sleeping
Commit ·
0f3999b
1
Parent(s): ca321f9
map
Browse files
app.py
CHANGED
|
@@ -51,8 +51,10 @@ def build_map(agent_sp):
|
|
| 51 |
)
|
| 52 |
).add_to(m)
|
| 53 |
|
| 54 |
-
return m.get_root().render()
|
| 55 |
-
|
|
|
|
|
|
|
| 56 |
|
| 57 |
def build_poi_sequence(agent_sp):
|
| 58 |
lines = []
|
|
@@ -90,7 +92,7 @@ with gr.Blocks(title="HiCoTraj Demo", theme=gr.themes.Soft()) as app:
|
|
| 90 |
label="Select Agent", value=str(sample_agents[0]))
|
| 91 |
demo_label = gr.Textbox(label="Ground Truth Demographics", interactive=False)
|
| 92 |
|
| 93 |
-
map_out = gr.HTML(label="Trajectory Map")
|
| 94 |
poi_out = gr.Textbox(label="POI Sequence", lines=20, interactive=False)
|
| 95 |
|
| 96 |
agent_dd.change(fn=on_select, inputs=agent_dd, outputs=[map_out, poi_out, demo_label])
|
|
|
|
| 51 |
)
|
| 52 |
).add_to(m)
|
| 53 |
|
| 54 |
+
# return m.get_root().render()
|
| 55 |
+
m.get_root().width = "100%"
|
| 56 |
+
m.get_root().height = "500px"
|
| 57 |
+
return m._repr_html_()
|
| 58 |
|
| 59 |
def build_poi_sequence(agent_sp):
|
| 60 |
lines = []
|
|
|
|
| 92 |
label="Select Agent", value=str(sample_agents[0]))
|
| 93 |
demo_label = gr.Textbox(label="Ground Truth Demographics", interactive=False)
|
| 94 |
|
| 95 |
+
map_out = gr.HTML(label="Trajectory Map", value="<div style='height:500px'></div>")
|
| 96 |
poi_out = gr.Textbox(label="POI Sequence", lines=20, interactive=False)
|
| 97 |
|
| 98 |
agent_dd.change(fn=on_select, inputs=agent_dd, outputs=[map_out, poi_out, demo_label])
|