cboettig commited on
Commit
e0fc76b
·
1 Parent(s): ffc4491
app.py CHANGED
@@ -11,7 +11,7 @@ import sqlite3
11
  import os
12
  from langchain_openai import ChatOpenAI
13
  os.environ["OPENAI_API_KEY"] = st.secrets["OPENAI_API_KEY"]
14
- st.set_page_config(page_title="Protected Areas Database Chat", page_icon="🦜")
15
  st.title("🦜 Protected Areas Database Chat")
16
 
17
  db_uri = "duckdb:///:memory:"
@@ -62,7 +62,7 @@ if "messages" not in st.session_state:
62
 
63
  main = st.container()
64
  with main:
65
- history = st.container(height=800)
66
  #with history:
67
  # for msg in st.session_state.messages:
68
  # st.chat_message(msg["role"]).write(msg["content"])
@@ -72,9 +72,6 @@ with main:
72
  st.markdown("\n") #add some space for iphone users
73
 
74
 
75
- # if "messages" not in st.session_state or st.sidebar.button("Clear message history"):
76
- # st.session_state["messages"] = [{"role": "assistant", "content": "How can I help you?"}]
77
-
78
 
79
 
80
  EXAMPLE_PROMPTS = ["What is the total area in each GAP_Sts category in the fee table?",
 
11
  import os
12
  from langchain_openai import ChatOpenAI
13
  os.environ["OPENAI_API_KEY"] = st.secrets["OPENAI_API_KEY"]
14
+ st.set_page_config(page_title="Protected Areas Database Chat", page_icon="🦜", layout="wide")
15
  st.title("🦜 Protected Areas Database Chat")
16
 
17
  db_uri = "duckdb:///:memory:"
 
62
 
63
  main = st.container()
64
  with main:
65
+ history = st.container(height=400)
66
  #with history:
67
  # for msg in st.session_state.messages:
68
  # st.chat_message(msg["role"]).write(msg["content"])
 
72
  st.markdown("\n") #add some space for iphone users
73
 
74
 
 
 
 
75
 
76
 
77
  EXAMPLE_PROMPTS = ["What is the total area in each GAP_Sts category in the fee table?",
minimal_agent.py DELETED
@@ -1,18 +0,0 @@
1
- # +
2
- from langchain.llms import OpenAI
3
- from langchain.agents import AgentType, initialize_agent, load_tools
4
- from langchain.callbacks import StreamlitCallbackHandler
5
- import streamlit as st
6
-
7
- llm = OpenAI(temperature=0, streaming=True)
8
- tools = load_tools(["ddg-search"])
9
- agent = initialize_agent(
10
- tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True
11
- )
12
-
13
- if prompt := st.chat_input():
14
- st.chat_message("user").write(prompt)
15
- with st.chat_message("assistant"):
16
- st_callback = StreamlitCallbackHandler(st.container())
17
- response = agent.run(prompt, callbacks=[st_callback])
18
- st.write(response)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
parquet/pad-agency-name.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:3214e7915ed1ae837420b3d6ab50f0d2174591e31c03844cba2df2129964ea08
3
- size 3505
 
 
 
 
parquet/pad-agency-type.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:46b9613af11476108df4f342d3a8f1be47633ac367a7c919d1cff6f39b03aa6f
3
- size 1906
 
 
 
 
parquet/pad-category.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:683e83bbccd8d19013150a763191087ae485468308e25895f5888ab7cb3247bd
3
- size 1897
 
 
 
 
parquet/pad-combined.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:73ae25546e2c1331a599b171eeaa3e08353fa357734eb4248817a11b8cfd3c02
3
- size 1559998546
 
 
 
 
parquet/pad-desgination-type.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:f1d95fe8e5f650ad9fdf6e11610a9751e2dbbe02ad4c6a06a0ddd2b1c6efa1f8
3
- size 3190
 
 
 
 
parquet/pad-easement.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4302f292aaee965ff38f92b7c2f8b30624be84fa704d0fb8a14e55ab3e7ebc23
3
- size 142852361
 
 
 
 
parquet/pad-fee.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:7a6243fa660321cb1265541b61f34372adfbce37b26398c0150bc11250a3f6f7
3
- size 856012934
 
 
 
 
parquet/pad-iucn.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:404eb24a418dc311d4eba44e3553118bea0decc77ddc4dbac85d81e18f3585c9
3
- size 2130
 
 
 
 
parquet/pad-marine.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1fe4ddcff9ffe602e95e0c76e2e839dd232e066a076886aaa0d9de60df1c8a69
3
- size 90825035
 
 
 
 
parquet/pad-public-access.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2de940f4521b68aec965b21cd929d950f150a0e6286343981ca07c543cb7801b
3
- size 1611
 
 
 
 
parquet/pad-state-name.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:45fdab1dcaa0c9a121048813e8367c083f9ed815b40e32d065eeaacbfb3f6ace
3
- size 3535