Spaces:
Runtime error
Runtime error
File size: 774 Bytes
60f5b9f 5206fbb 9dddd1e 39103b5 9dddd1e 5206fbb 16d3fdf 9dddd1e 9163cdf 4b20003 9163cdf ada0a19 9163cdf bef36b3 5206fbb bef36b3 0c0e0a0 bef36b3 ada0a19 5206fbb bc723d2 5206fbb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# pylint: disable=invalid-name
""" A Streamlit app for GnosisPages. """
import os
import streamlit as st
import openai
from dotenv import load_dotenv
from gnosis.chroma_client import ChromaDB
import gnosis.gui_messages as gm
from gnosis import settings
from gnosis.components.sidebar import sidebar
from gnosis.components.main import main
load_dotenv()
openai.api_key = os.getenv("OPENAI_API_KEY")
if "api_message" not in st.session_state:
st.session_state.api_message = gm.api_message(openai.api_key)
if "wk_button" not in st.session_state:
st.session_state.wk_button = False
# Build settings
chroma_db = ChromaDB(openai.api_key)
collection = settings.build(chroma_db)
# Sidebar
sidebar(chroma_db, collection)
main(openai.api_key, chroma_db, collection)
|