Spaces:
Sleeping
Sleeping
Requirements.txt added
Browse files- model.py +1 -1
- requirements.txt +7 -0
model.py
CHANGED
|
@@ -14,7 +14,6 @@ from langchain_openai import AzureChatOpenAI
|
|
| 14 |
from langgraph.graph.state import CompiledStateGraph
|
| 15 |
from langgraph.prebuilt import tools_condition
|
| 16 |
from langgraph.prebuilt import ToolNode
|
| 17 |
-
import matplotlib.pyplot as plt
|
| 18 |
|
| 19 |
from typing import Optional
|
| 20 |
|
|
@@ -60,6 +59,7 @@ class AssistantModel:
|
|
| 60 |
return {"messages": [self.llm_with_tools.invoke([sys_msg] + state["messages"])]}
|
| 61 |
|
| 62 |
def show_graph(self):
|
|
|
|
| 63 |
# python -m pip install --config-settings="--global-option=build_ext" --config-settings="--global-option=-IC:\Program Files\Graphviz\include" --config-settings="--global-option=-LC:\Program Files\Graphviz\lib" pygraphviz
|
| 64 |
png = self.graph.get_graph(xray=True).draw_png()
|
| 65 |
image = Image.open(io.BytesIO(png))
|
|
|
|
| 14 |
from langgraph.graph.state import CompiledStateGraph
|
| 15 |
from langgraph.prebuilt import tools_condition
|
| 16 |
from langgraph.prebuilt import ToolNode
|
|
|
|
| 17 |
|
| 18 |
from typing import Optional
|
| 19 |
|
|
|
|
| 59 |
return {"messages": [self.llm_with_tools.invoke([sys_msg] + state["messages"])]}
|
| 60 |
|
| 61 |
def show_graph(self):
|
| 62 |
+
import matplotlib.pyplot as plt
|
| 63 |
# python -m pip install --config-settings="--global-option=build_ext" --config-settings="--global-option=-IC:\Program Files\Graphviz\include" --config-settings="--global-option=-LC:\Program Files\Graphviz\lib" pygraphviz
|
| 64 |
png = self.graph.get_graph(xray=True).draw_png()
|
| 65 |
image = Image.open(io.BytesIO(png))
|
requirements.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pandas
|
| 2 |
+
langgraph
|
| 3 |
+
langchain_openai
|
| 4 |
+
langchain_core
|
| 5 |
+
langchain_community
|
| 6 |
+
langchain_tavily
|
| 7 |
+
|