Spaces:
Running
Running
Ludovic Moncla
commited on
Commit
·
974cec8
1
Parent(s):
228582f
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ def create_map(lat, long):
|
|
| 16 |
lon=[long],
|
| 17 |
mode='markers',
|
| 18 |
marker=go.scattermapbox.Marker(
|
| 19 |
-
size=
|
| 20 |
),
|
| 21 |
#hoverinfo="text",
|
| 22 |
#hovertemplate='<b>Name</b>: %{customdata[0]}<br><b>Price</b>: $%{customdata[1]}'
|
|
@@ -32,7 +32,7 @@ def create_map(lat, long):
|
|
| 32 |
lon=long
|
| 33 |
),
|
| 34 |
pitch=0,
|
| 35 |
-
zoom=
|
| 36 |
),
|
| 37 |
margin=dict(l=0, r=0, t=0, b=0) # <-- removes margins
|
| 38 |
)
|
|
@@ -111,6 +111,11 @@ with gr.Blocks() as demo:
|
|
| 111 |
|
| 112 |
run_btn = gr.Button("Extract & Show")
|
| 113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
with gr.Column():
|
| 116 |
out_text = gr.Textbox(label="Detect coordinates (fine-tuned BERT binary classifier)")
|
|
@@ -123,14 +128,8 @@ with gr.Blocks() as demo:
|
|
| 123 |
#out_map = gr.Map(label="Coordinates on Map")
|
| 124 |
map = gr.Plot(label="Coordinates on Map")
|
| 125 |
run_btn.click(fn=norm_coordinates, inputs=inp, outputs=[out_text, map])
|
| 126 |
-
|
| 127 |
-
with gr.Row():
|
| 128 |
|
| 129 |
-
|
| 130 |
-
examples=examples,
|
| 131 |
-
inputs=inp,
|
| 132 |
-
label="Examples"
|
| 133 |
-
)
|
| 134 |
|
| 135 |
# Launch
|
| 136 |
if __name__ == "__main__":
|
|
|
|
| 16 |
lon=[long],
|
| 17 |
mode='markers',
|
| 18 |
marker=go.scattermapbox.Marker(
|
| 19 |
+
size=10
|
| 20 |
),
|
| 21 |
#hoverinfo="text",
|
| 22 |
#hovertemplate='<b>Name</b>: %{customdata[0]}<br><b>Price</b>: $%{customdata[1]}'
|
|
|
|
| 32 |
lon=long
|
| 33 |
),
|
| 34 |
pitch=0,
|
| 35 |
+
zoom=3
|
| 36 |
),
|
| 37 |
margin=dict(l=0, r=0, t=0, b=0) # <-- removes margins
|
| 38 |
)
|
|
|
|
| 111 |
|
| 112 |
run_btn = gr.Button("Extract & Show")
|
| 113 |
|
| 114 |
+
gr.Examples(
|
| 115 |
+
examples=examples,
|
| 116 |
+
inputs=inp,
|
| 117 |
+
label="Examples"
|
| 118 |
+
)
|
| 119 |
|
| 120 |
with gr.Column():
|
| 121 |
out_text = gr.Textbox(label="Detect coordinates (fine-tuned BERT binary classifier)")
|
|
|
|
| 128 |
#out_map = gr.Map(label="Coordinates on Map")
|
| 129 |
map = gr.Plot(label="Coordinates on Map")
|
| 130 |
run_btn.click(fn=norm_coordinates, inputs=inp, outputs=[out_text, map])
|
|
|
|
|
|
|
| 131 |
|
| 132 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
# Launch
|
| 135 |
if __name__ == "__main__":
|