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
import streamlit as st | |
from persist import persist, load_widget_state | |
def main(): | |
if "page" not in st.session_state: | |
# Initialize session state. | |
st.session_state.update({ | |
# Default page. | |
"page": "home", |
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
import React, {useEffect, useRef, useState} from 'react'; | |
import { Switch, Flex, Text } from '@chakra-ui/react'; | |
import UplotReact from 'uplot-react'; | |
import { toast } from 'react-toastify'; | |
import 'uplot/dist/uPlot.min.css'; | |
const colors = [ | |
'#007BFF', | |
'#FFA62B', |
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
import os | |
from .app import start_cli_service | |
env = (os.environ.get("env") or "prod").lower() | |
is_dev = env == "dev" or env == "local" | |
port, autoreload_observer = start_cli_service(autoreload=is_dev) | |
if autoreload_observer: | |
# move autoreload observer to the foreground so process won't exit |
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
# pip3 install openai | |
import openai | |
import time | |
OPENAI_API_KEY = "your_api_key_here" | |
openai.api_key = OPENAI_API_KEY | |
prompt = """French: La semaine dernière, quelqu’un m’a fait part de sa gratitude envers notre travail. |
OlderNewer