cicboy commited on
Commit
44d5035
·
1 Parent(s): 09f88be

update app.py and requirements.txt

Browse files
Files changed (3) hide show
  1. .DS_Store +0 -0
  2. app.py +2 -2
  3. requirements.txt +2 -4
.DS_Store ADDED
Binary file (6.15 kB). View file
 
app.py CHANGED
@@ -5,7 +5,7 @@ import arxiv
5
  import gradio as gr
6
  from tavily import TavilyClient
7
  from langchain_community.chat_models import ChatOpenAI
8
- from langchain.schema import SystemMessage, HumanMessage
9
 
10
  # ====== Environment Setup ======
11
  # Hugging Face injects secrets automatically via Repo > Settings > Secrets
@@ -84,7 +84,7 @@ Guidelines:
84
  ]
85
 
86
  # Generate summary
87
- response = llm(messages)
88
 
89
  # Combine results into readable markdown
90
  summary = f"### 🧠 Summary\n{response.content}\n\n**Sources:**\n" + \
 
5
  import gradio as gr
6
  from tavily import TavilyClient
7
  from langchain_community.chat_models import ChatOpenAI
8
+ from langchain_core.messages import SystemMessage, HumanMessage
9
 
10
  # ====== Environment Setup ======
11
  # Hugging Face injects secrets automatically via Repo > Settings > Secrets
 
84
  ]
85
 
86
  # Generate summary
87
+ response = llm.invoke(messages)
88
 
89
  # Combine results into readable markdown
90
  summary = f"### 🧠 Summary\n{response.content}\n\n**Sources:**\n" + \
requirements.txt CHANGED
@@ -1,7 +1,5 @@
1
  gradio
2
- python-dotenv
3
  tavily-python
4
  arxiv
5
- langchain
6
- langchain-community
7
- openai
 
1
  gradio
 
2
  tavily-python
3
  arxiv
4
+ langchain-core
5
+ langchain-openai>=0.3.9