Created
September 6, 2022 16:22
-
-
Save mturoci/b371b6621073ff0be999213c31b05bc2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from h2o_wave import main, app, Q, ui | |
@app('/') | |
async def serve(q: Q): | |
# Use app scope to make sure the file is uploaded only once. | |
if not q.app.initialized: | |
# Upload the file to the Wave server. | |
download_path, = await q.site.upload(['dataset.csv']) | |
q.app.initialized = True | |
# TODO: Draw a UI to allow file downloads. | |
await q.page.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment