Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,15 +6,6 @@ from langchain_openai import ChatOpenAI
|
|
6 |
from langchain_anthropic import ChatAnthropic
|
7 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
8 |
|
9 |
-
###### dotenv を利用する場合 ######
|
10 |
-
try:
|
11 |
-
from dotenv import load_dotenv
|
12 |
-
load_dotenv()
|
13 |
-
except ImportError:
|
14 |
-
import warnings
|
15 |
-
warnings.warn("dotenv not found. Please make sure to set your environment variables manually.", ImportWarning)
|
16 |
-
################################################
|
17 |
-
|
18 |
|
19 |
PROMPT = """
|
20 |
You are an AI assistant specializing in anger management. Your task is to provide thoughtful, practical, and effective advice to help the user manage their anger based on:
|
@@ -58,6 +49,10 @@ def init_chain():
|
|
58 |
|
59 |
def main():
|
60 |
init_page()
|
|
|
|
|
|
|
|
|
61 |
chain = init_chain()
|
62 |
if chain:
|
63 |
who = st.text_input("Who are you angry at?", key="who")
|
@@ -69,19 +64,4 @@ def main():
|
|
69 |
if __name__ == '__main__':
|
70 |
main()
|
71 |
|
72 |
-
# Style adjustments (optional, remove if not needed)
|
73 |
-
st.markdown(
|
74 |
-
"""
|
75 |
-
<style>
|
76 |
-
/* Custom style adjustments */
|
77 |
-
.st-emotion-cache-15ecox0 { display: none !important; }
|
78 |
-
@media (max-width: 50.5rem) {
|
79 |
-
.st-emotion-cache-13ln4jf {
|
80 |
-
max-width: calc(0rem + 100vw);
|
81 |
-
}
|
82 |
-
}
|
83 |
-
</style>
|
84 |
-
""",
|
85 |
-
unsafe_allow_html=True,
|
86 |
-
)
|
87 |
|
|
|
6 |
from langchain_anthropic import ChatAnthropic
|
7 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
PROMPT = """
|
11 |
You are an AI assistant specializing in anger management. Your task is to provide thoughtful, practical, and effective advice to help the user manage their anger based on:
|
|
|
49 |
|
50 |
def main():
|
51 |
init_page()
|
52 |
+
# Style adjustments (optional, remove if not needed)
|
53 |
+
st.markdown("""<style>.st-emotion-cache-15ecox0 { display: none !important; }
|
54 |
+
@media (max-width: 50.5rem) {.st-emotion-cache-13ln4jf {max-width: calc(0rem + 100vw);}}
|
55 |
+
</style>""",unsafe_allow_html=True,)
|
56 |
chain = init_chain()
|
57 |
if chain:
|
58 |
who = st.text_input("Who are you angry at?", key="who")
|
|
|
64 |
if __name__ == '__main__':
|
65 |
main()
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|