Spaces:
Sleeping
Sleeping
Commit
·
3f940cd
1
Parent(s):
be06203
feat: split css
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import os
|
|
2 |
|
3 |
import streamlit as st
|
4 |
import streamlit.components.v1 as components
|
|
|
5 |
from langchain import OpenAI
|
6 |
from langchain.callbacks import get_openai_callback
|
7 |
from langchain.chains import ConversationChain
|
@@ -9,12 +10,6 @@ from langchain.chains.conversation.memory import ConversationSummaryMemory
|
|
9 |
from message import Message
|
10 |
|
11 |
|
12 |
-
def load_css():
|
13 |
-
with open("static/styles.css", "r") as f:
|
14 |
-
css = f"<style>{f.read()}</style>"
|
15 |
-
st.markdown(css, unsafe_allow_html=True)
|
16 |
-
|
17 |
-
|
18 |
def initialize_session_state():
|
19 |
if "history" not in st.session_state:
|
20 |
st.session_state.history = []
|
|
|
2 |
|
3 |
import streamlit as st
|
4 |
import streamlit.components.v1 as components
|
5 |
+
from css import load_css
|
6 |
from langchain import OpenAI
|
7 |
from langchain.callbacks import get_openai_callback
|
8 |
from langchain.chains import ConversationChain
|
|
|
10 |
from message import Message
|
11 |
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
def initialize_session_state():
|
14 |
if "history" not in st.session_state:
|
15 |
st.session_state.history = []
|
css.py
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
|
4 |
+
def load_css():
|
5 |
+
with open("static/styles.css", "r") as f:
|
6 |
+
css = f"<style>{f.read()}</style>"
|
7 |
+
st.markdown(css, unsafe_allow_html=True)
|