generated from broomva/databricks_session
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
54 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
databricks_experiment_name='' | ||
databricks_experiment_id='' | ||
databricks_host='' | ||
databricks_token='' | ||
databricks_username='' | ||
databricks_password='' | ||
databricks_cluster_id='' | ||
databricks_sql_http_path='' | ||
PG_USERNAME='' | ||
PG_PASSWORD='' | ||
PG_HOST='' | ||
PG_PORT='' | ||
PG_DATABASE='' | ||
LANGCHAIN_TRACING_V2='' | ||
LANGCHAIN_ENDPOINT='' | ||
LANGCHAIN_API_KEY='' | ||
LANGCHAIN_PROJECT='' | ||
DAGSTER_HOME='' | ||
OPENAI_API_BASE_URL='' | ||
OPENAI_MODEL_NAME='' | ||
TOGETHER_API_KEY='' | ||
BROWSERLESS_API_KEY='' | ||
SERP_API_KEY='' | ||
SQLALCHEMY_URL='' | ||
OPENAI_API_KEY='' | ||
CHAINLIT_API_KEY='' | ||
OAUTH_GITHUB_CLIENT_ID='' | ||
OAUTH_GITHUB_CLIENT_SECRET='' | ||
CHAINLIT_AUTH_SECRET='' | ||
HUGGINGFACEHUB_API_TOKEN='' | ||
SENDGRID_API_KEY='' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ __pycache__/ | |
|
||
.streamlit/secrets.toml | ||
|
||
|
||
dagster_runtime/ | ||
|
||
# C extensions | ||
*.so | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,9 +73,15 @@ def get_article(context, get_url) -> str: | |
if not get_url: | ||
return None | ||
try: | ||
response = scrape_website_selenium(get_url[0]) | ||
try: | ||
response = scrape_website_selenium(get_url[0]) | ||
context.log.debug(f"Selenium response {response}") | ||
except Exception as e: | ||
response = None | ||
if response is None: | ||
context.log.warning(f"Selenium response was None. Using BS4") | ||
response = scrape_website(get_url[0]) | ||
context.log.debug(f"Bs4 Scrape response {response}") | ||
except Exception as e: | ||
context.log.info(f"Error {e}") | ||
response = None | ||
|
@@ -218,7 +224,7 @@ def write_consolidated_summary(context, consolidated_summary, get_articles_summa | |
def send_email_with_sendgrid(context, get_url, summarize_article): | ||
email = get_url[2] | ||
message = Mail( | ||
from_email="[email protected]", | ||
from_email="Vortex Summaries", | ||
to_emails=email, | ||
subject="Here is your URL summary! 🎉", | ||
plain_text_content=summarize_article, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters