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
from h2o_wave import main, app, Q, ui | |
import pandas as pd | |
import numpy as np | |
@app('/') | |
async def serve(q: Q): | |
print(q.args) | |
if not q.client.initialized: |
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
""" | |
Demo of Updating App Data in one card of an app | |
""" | |
from random import randint | |
from h2o_wave import Q, app, handle_on, main, on, ui | |
@app("/") | |
async def serve(q: Q): |
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
import json | |
import requests | |
from h2o_wave import main, app, Q, ui, expando_to_dict | |
ENDPOINT = "https://model.DOMAIN.h2o.ai/MODELID/model" | |
APP_TITLE = "My Use Case" | |
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
from h2o_wave import main, app, Q, ui, on, handle_on | |
@app('/') | |
async def serve(q: Q): | |
print(q.args) | |
# First time a browser comes to the app | |
if not q.client.initialized: | |
await init(q) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import os | |
import certifi | |
import pandas as pd | |
import urllib3 # urllib3==1.26.10 | |
from h2o_wave import Q, app, handle_on, main, on, ui # h2o_wave==0.22.0 | |
@app("/") | |
async def serve(q: Q): |
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
from h2o_wave import main, app, Q, ui | |
import jwt | |
@app('/') | |
async def serve(q: Q): | |
if not q.app.initialized: | |
q.app.authorization_role = "my_important_group" |
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
# Connect to a WaveDB table: allow the user to explore all rows and edit the data | |
# To run this app you need to run `./wavedb` first | |
# The UI and SQL calls in this demo are hardcoded to a specific UI and would need to be updated as the data changes | |
# There was no attempt to "automatically" create the UI based on a generic SQL table | |
# This example does not include sorting, filtering, or downloading the dataset | |
from h2o_wave import main, app, Q, ui, connect | |
@app('/') | |
async def serve(q: Q): |
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
from h2o_wave import main, app, Q, ui | |
import pandas as pd | |
@app('/') | |
async def serve(q: Q): | |
if not q.client.initialized: | |
q.page["meta"] = ui.meta_card(box="") |
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
import os | |
import asyncio | |
from h2o_wave import main, app, Q, ui, data, run_on, on | |
from h2ogpte import H2OGPTE | |
from h2ogpte.types import ChatMessage, PartialChatMessage | |
SYSTEM_PROMPT = "Hello, I am a bot that only talks about dogs!" |