heysho commited on
Commit
438da87
1 Parent(s): d2ecd91

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -12
app.py CHANGED
@@ -6,7 +6,6 @@ from langchain_openai import ChatOpenAI
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. 課題: ユーザーが報告した感情とその日の計画に直接関連するユニークなモチベーショナルまたはリフレクティブな引用を生成します。
@@ -50,16 +49,7 @@ def init_chain():
50
  output_parser = StrOutputParser()
51
  chain = prompt | llm | output_parser
52
  return chain
53
-
54
- def send_height():
55
- st.components.v1.html("""
56
- <script>
57
- window.onload = () => {
58
- const height = document.body.scrollHeight;
59
- window.parent.postMessage({ type: 'resize', height: height }, '*');
60
- };
61
- </script>
62
- """, height=0)
63
 
64
 
65
  def main():
@@ -68,7 +58,6 @@ def main():
68
  st.markdown("""<style>.st-emotion-cache-15ecox0 { display: none !important; }
69
  @media (max-width: 50.5rem) {.st-emotion-cache-13ln4jf {max-width: calc(0rem + 100vw);}}
70
  </style>""",unsafe_allow_html=True,)
71
- send_height()
72
  chain = init_chain()
73
  if chain:
74
  feeling = st.selectbox(
 
6
  from langchain_anthropic import ChatAnthropic
7
  from langchain_google_genai import ChatGoogleGenerativeAI
8
 
 
9
 
10
  PROMPT = """
11
  1. 課題: ユーザーが報告した感情とその日の計画に直接関連するユニークなモチベーショナルまたはリフレクティブな引用を生成します。
 
49
  output_parser = StrOutputParser()
50
  chain = prompt | llm | output_parser
51
  return chain
52
+
 
 
 
 
 
 
 
 
 
53
 
54
 
55
  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(