Spaces:
Sleeping
Sleeping
Download app.py from geeksiddhant/st: direct link, hf CLI and curl.
- Browser
- Download file 474 Bytes
-
https://huggingface.co/spaces/geeksiddhant/st/resolve/main/app.py
- Command line
-
hf download hf://spaces/geeksiddhant/st/app.py
-
curl -L -o app.py https://huggingface.co/spaces/geeksiddhant/st/resolve/main/app.py
474 Bytes
| import os | |
| from notion_client import Client | |
| notion_api_key = os.environ.get("NOTION_API_KEY") | |
| notion = Client(auth=notion_api_key) | |
| page_id = '67dd09be5b3b44d694996a75c07ecc26' | |
| response = notion.pages.retrieve(page_id=page_id) | |
| response_body = notion.blocks.children.list( | |
| block_id=page_id | |
| ) | |
| import streamlit as st | |
| st.title(response['properties']['title']['title'][0]['plain_text']) | |
| st.write(response_body['results'][1]['paragraph']['rich_text'][0]['plain_text']) |