Jonathan Marokhovsky commited on
Commit
9d89bf5
1 Parent(s): 7a5c15f

Adding to to_streamlit() fixes the DeltaGenerator Error. Also some reorganizing

Browse files
Files changed (1) hide show
  1. app.py +12 -7
app.py CHANGED
@@ -1,19 +1,24 @@
1
- import ibis
2
- from ibis import _
3
- import ibis.selectors as s
4
  import leafmap.foliumap as leafmap
5
- from leafmap import pmtiles_style
6
  import rioxarray
7
  import geopandas as gpd
8
  import streamlit as st
 
 
 
 
 
9
  from streamlit_folium import st_folium
 
 
10
 
 
11
 
 
 
12
  st.set_page_config(layout="wide", page_title="Huggingface Toy", page_icon="❦")
 
13
 
14
  """
15
- # Huggingface Streamlit Toy
16
-
17
  This is a toy to play around with Huggingface, Leafmap, and Streamlit
18
 
19
  I'm looking to implement at least these things:
@@ -107,7 +112,7 @@ st.divider()
107
 
108
  # run whatever python code is in the python box, just for fun
109
  eval(compile(code, "<string>", "exec"))
110
- st_data = m.to_streamlit(height=700)
111
  polygon = st_data["last_active_drawing"]
112
  if polygon is not None:
113
  "### The Polygon is: "
 
 
 
 
1
  import leafmap.foliumap as leafmap
 
2
  import rioxarray
3
  import geopandas as gpd
4
  import streamlit as st
5
+
6
+ # import altair as alt
7
+ # import ibis
8
+ # from ibis import _
9
+ # import ibis.selectors as s
10
  from streamlit_folium import st_folium
11
+ import json
12
+ from leafmap import pmtiles_style
13
 
14
+ # Common Functions
15
 
16
+
17
+ # Actual Page content below
18
  st.set_page_config(layout="wide", page_title="Huggingface Toy", page_icon="❦")
19
+ st.title("Huggingface Streamlit Toy")
20
 
21
  """
 
 
22
  This is a toy to play around with Huggingface, Leafmap, and Streamlit
23
 
24
  I'm looking to implement at least these things:
 
112
 
113
  # run whatever python code is in the python box, just for fun
114
  eval(compile(code, "<string>", "exec"))
115
+ st_data = m.to_streamlit(height=700, bidirectional=True)
116
  polygon = st_data["last_active_drawing"]
117
  if polygon is not None:
118
  "### The Polygon is: "