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

include preview, fix paths 🔧 #9

Merged
merged 5 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Sync to Hugging Face hub
on:
pull_request:
# to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Push to hub
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git remote add preview https://cboettig:[email protected]/spaces/boettiger-lab/preview-ca-30x30
git push --set-upstream preview HEAD:main
git remote rm preview

4 changes: 2 additions & 2 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class SQLResponse(BaseModel):
sql_query: str = Field(description="The SQL query generated by the assistant.")
explanation: str = Field(description="A detailed explanation of how the SQL query answers the input question.")

with open('system_prompt.txt', 'r') as file:
with open('app/system_prompt.txt', 'r') as file:
template = file.read()

from langchain_openai import ChatOpenAI
Expand Down Expand Up @@ -548,7 +548,7 @@ def summary_table_sql(ca, column, colors, ids): # get df for charts + df_tab for

st.divider()

with open('footer.md', 'r') as file:
with open('app/footer.md', 'r') as file:
footer = file.read()
st.markdown(footer)

Expand Down
Loading