Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -184,17 +184,7 @@ def sync_to_notion(token, database_id, branch_data):
|
|
184 |
print("Something went wrong", err)
|
185 |
|
186 |
|
187 |
-
# Wrapper function for the Gradio interface
|
188 |
-
def run_sync():
|
189 |
-
# Define your token, database_id, and branch_data
|
190 |
-
token = "your_token"
|
191 |
-
database_id = "your_database_id"
|
192 |
-
branch_data = extract_branch_info(stream_id, server_url=None, token=None)
|
193 |
|
194 |
-
# Call your function
|
195 |
-
sync_to_notion(token, database_id, branch_data)
|
196 |
-
|
197 |
-
return "Sync completed successfully!"
|
198 |
|
199 |
# branch_data = extract_branch_info("287b605243", server_url="https://speckle.xyz/", token="52566d1047b881764e16ad238356abeb2fc35d8b42")
|
200 |
# sync_to_notion("secret_V2olY3GMsTLaC910Ym20xT9RnBfoDdrAwXb1ayBupXI", "402d60c9c1ef4980a3d85c5a4f4a0c97", branch_data)
|
@@ -225,7 +215,7 @@ def update_streams(dummy):
|
|
225 |
notion_db = value["notionDB"]
|
226 |
stream_id = stream_url.split('/')[-1]
|
227 |
|
228 |
-
branch_data = extract_branch_info(stream_id, server_url=
|
229 |
sync_to_notion(notion_token, notion_db, branch_data)
|
230 |
|
231 |
return "All streams updated successfully!"
|
|
|
184 |
print("Something went wrong", err)
|
185 |
|
186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
|
|
|
|
|
|
|
|
|
188 |
|
189 |
# branch_data = extract_branch_info("287b605243", server_url="https://speckle.xyz/", token="52566d1047b881764e16ad238356abeb2fc35d8b42")
|
190 |
# sync_to_notion("secret_V2olY3GMsTLaC910Ym20xT9RnBfoDdrAwXb1ayBupXI", "402d60c9c1ef4980a3d85c5a4f4a0c97", branch_data)
|
|
|
215 |
notion_db = value["notionDB"]
|
216 |
stream_id = stream_url.split('/')[-1]
|
217 |
|
218 |
+
branch_data = extract_branch_info(stream_id, server_url="https://speckle.xyz/", token=speckle_token)
|
219 |
sync_to_notion(notion_token, notion_db, branch_data)
|
220 |
|
221 |
return "All streams updated successfully!"
|