cboettig commited on
Commit
6fd5828
·
1 Parent(s): 1493ed6

use external url

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -12,8 +12,8 @@ from ibis import _
12
  from langchain_openai import ChatOpenAI
13
  from langchain_community.utilities import SQLDatabase
14
  from langchain.chains import create_sql_query_chain
15
-
16
-
17
  # +
18
  ## Benchmark possible access locations, but local blows everything else away
19
 
@@ -120,10 +120,10 @@ def host_df(df, filename = "live.json", repo_id="boettiger-lab/gbif"):
120
 
121
  import pydeck as pdk
122
  def hex_layer(m, df: pd.DataFrame, v_scale = 1):
123
-
124
  layer = pdk.Layer(
125
  "H3HexagonLayer",
126
- df,
127
  get_hexagon="hex",
128
  get_fill_color="rgb",
129
  extruded=True,
 
12
  from langchain_openai import ChatOpenAI
13
  from langchain_community.utilities import SQLDatabase
14
  from langchain.chains import create_sql_query_chain
15
+ from huggingface_hub import HfApi, login
16
+ login(st.secrets["HF_TOKEN"])
17
  # +
18
  ## Benchmark possible access locations, but local blows everything else away
19
 
 
120
 
121
  import pydeck as pdk
122
  def hex_layer(m, df: pd.DataFrame, v_scale = 1):
123
+ url = host_df(df)
124
  layer = pdk.Layer(
125
  "H3HexagonLayer",
126
+ data = url,
127
  get_hexagon="hex",
128
  get_fill_color="rgb",
129
  extruded=True,