heysho commited on
Commit
c356634
·
verified ·
1 Parent(s): 97e4e1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -25
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
  ## Task: Analyze customer reviews for our product, the 'Review Analyzer'. Focus on extracting key points that a potential buyer would find helpful. Include sentiment analysis to determine overall customer satisfaction.
@@ -57,6 +48,10 @@ def init_chain():
57
 
58
  def main():
59
  init_page()
 
 
 
 
60
  chain = init_chain()
61
  if chain:
62
  brand = st.text_input("Enter the brand name (e.g., Nike)", key="brand")
@@ -69,19 +64,3 @@ def main():
69
 
70
  if __name__ == '__main__':
71
  main()
72
-
73
- # Style adjustments (optional, remove if not needed)
74
- st.markdown(
75
- """
76
- <style>
77
- /* Custom style adjustments */
78
- .st-emotion-cache-15ecox0 { display: none !important; }
79
- @media (max-width: 50.5rem) {
80
- .st-emotion-cache-13ln4jf {
81
- max-width: calc(0rem + 100vw);
82
- }
83
- }
84
- </style>
85
- """,
86
- unsafe_allow_html=True,
87
- )
 
6
  from langchain_anthropic import ChatAnthropic
7
  from langchain_google_genai import ChatGoogleGenerativeAI
8
 
 
 
 
 
 
 
 
 
 
9
 
10
  PROMPT = """
11
  ## Task: Analyze customer reviews for our product, the 'Review Analyzer'. Focus on extracting key points that a potential buyer would find helpful. Include sentiment analysis to determine overall customer satisfaction.
 
48
 
49
  def main():
50
  init_page()
51
+ # Style adjustments (optional, remove if not needed)
52
+ st.markdown("""<style>.st-emotion-cache-15ecox0 { display: none !important; }
53
+ @media (max-width: 50.5rem) {.st-emotion-cache-13ln4jf {max-width: calc(0rem + 100vw);}}
54
+ </style>""",unsafe_allow_html=True,)
55
  chain = init_chain()
56
  if chain:
57
  brand = st.text_input("Enter the brand name (e.g., Nike)", key="brand")
 
64
 
65
  if __name__ == '__main__':
66
  main()