heysho commited on
Commit
4a46664
1 Parent(s): ab5237c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -6,6 +6,7 @@ from langchain_openai import ChatOpenAI
6
  from langchain_anthropic import ChatAnthropic
7
  from langchain_google_genai import ChatGoogleGenerativeAI
8
 
 
9
 
10
  PROMPT = """
11
  1. 課題: ユーザーが報告した感情とその日の計画に直接関連するユニークなモチベーショナルまたはリフレクティブな引用を生成します。
@@ -58,6 +59,19 @@ def main():
58
  st.markdown("""<style>.st-emotion-cache-15ecox0 { display: none !important; }
59
  @media (max-width: 50.5rem) {.st-emotion-cache-13ln4jf {max-width: calc(0rem + 100vw);}}
60
  </style>""",unsafe_allow_html=True,)
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  chain = init_chain()
62
  if chain:
63
  feeling = st.selectbox(
 
6
  from langchain_anthropic import ChatAnthropic
7
  from langchain_google_genai import ChatGoogleGenerativeAI
8
 
9
+ import streamlit.components.v1 as components
10
 
11
  PROMPT = """
12
  1. 課題: ユーザーが報告した感情とその日の計画に直接関連するユニークなモチベーショナルまたはリフレクティブな引用を生成します。
 
59
  st.markdown("""<style>.st-emotion-cache-15ecox0 { display: none !important; }
60
  @media (max-width: 50.5rem) {.st-emotion-cache-13ln4jf {max-width: calc(0rem + 100vw);}}
61
  </style>""",unsafe_allow_html=True,)
62
+
63
+
64
+ # Your HTML and JavaScript code
65
+ html_code = """
66
+ <script type="text/javascript">
67
+ window.onload = function() {
68
+ var height = document.getElementsByTagName("html")[0].scrollHeight;
69
+ window.parent.postMessage(["setHeight", height], "https://arigatoai.com/agent/daily-reminder.html");
70
+ }
71
+ </script>
72
+ """
73
+
74
+ components.html(html_code, height=300)
75
  chain = init_chain()
76
  if chain:
77
  feeling = st.selectbox(