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, run_on, data | |
@app('/') | |
async def serve(q: Q): | |
print(q.args) | |
print(q.events) | |
# First time a browser comes to the app | |
if not q.client.initialized: | |
await initialize_client_session(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 os | |
from h2ogpte import H2OGPTE | |
EMAIL = "[email protected]" | |
client = H2OGPTE( | |
address='https://playground.h2ogpte.h2o.ai', | |
api_key='sk-', | |
) |
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, run_on, data | |
@app('/') | |
async def serve(q: Q): | |
print(q.args) | |
# First time a browser comes to the app | |
if not q.client.initialized: | |
await initialize_client_session(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, on, handle_on | |
@app('/') | |
async def serve(q: Q): | |
# First time a browser comes to the app | |
if not q.client.initialized: | |
await init(q) | |
q.client.initialized = True |
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
[data-test="header"] { | |
background: #000000 !important; | |
} | |
/* will be used by default for buttons*/ | |
.ms-Button--default { | |
background-color: #6c757d; | |
color: #FFFFFF; | |
border-color: #6c757d; | |
border-radius: 2rem; | |
} |
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 os | |
from docx import Document | |
from openpyxl import load_workbook | |
from reportlab.pdfgen import canvas | |
from reportlab.lib.pagesizes import letter | |
from reportlab.platypus import SimpleDocTemplate, Table, TableStyle | |
from reportlab.lib import colors | |
# from msgpy import MSG |
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 | |
@app('/') | |
async def serve(q: Q): | |
q.page["meta"] = ui.meta_card( | |
box="", | |
layouts=[ | |
ui.layout( |
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, SessionError | |
from h2ogpte.errors import UnauthorizedError | |
from loguru import logger |
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
""" | |
Code Executing Testing from LLMs | |
Michelle Tanco - [email protected] | |
March 4, 2024 | |
We are attempting to get executable Python code from an LLM. This testing suite helps us with that process. | |
""" | |
import os | |
from h2ogpte import H2OGPTE | |
from h2ogpte.types import SessionError |
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!" |
NewerOlder