Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(app): rewrite demo application with connection config tweaks and use generic PythonTool #74

Open
sfc-gh-twhite opened this issue Dec 3, 2024 · 1 comment · May be fixed by #69

Comments

@sfc-gh-twhite
Copy link
Collaborator

The Streamlit application needs a few adjustments before it can be better dockerized".

The application currently assumes a .env file exists in the parent directory.

load_dotenv("../.env")

A few environment variables need to be provided to establish a connection to Snowflake and the News API that is currently being used.

connection_parameters = {
"account": os.getenv("SNOWFLAKE_ACCOUNT"),
"user": os.getenv("SNOWFLAKE_USER"),
"password": os.getenv("SNOWFLAKE_PASSWORD"),
"role": os.getenv("SNOWFLAKE_ROLE"),
"warehouse": os.getenv("SNOWFLAKE_WAREHOUSE"),
"database": os.getenv("SNOWFLAKE_DATABASE"),
"schema": os.getenv("SNOWFLAKE_SCHEMA"),
}
os.environ["NEWS_API_TOKEN"] = os.getenv("NEWS_API_TOKEN")

Lastly, I think we've got some legacy naming stuff going on that we will need to adjust:

st.set_page_config(page_title="Snowflake Cortex Cube")

st.markdown(
"<h1>🧠 Snowflake Cortex<sup style='font-size:.8em;'>3</sup></h1>",
unsafe_allow_html=True,
)

@sfc-gh-twhite sfc-gh-twhite linked a pull request Dec 3, 2024 that will close this issue
@sfc-gh-twhite sfc-gh-twhite linked a pull request Dec 3, 2024 that will close this issue
@sfc-gh-alherrera
Copy link
Collaborator

Good call outs. I think we can probably just kill the news search tool from this app and make it a generic web page crawler like in the README to simplify this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants