Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ planner = Agent(
|
|
61 |
"You're tasked with researching {topic} patents and identifying key trends and players. Your work supports the Patent Writer and Data Analyst."
|
62 |
),
|
63 |
allow_delegation=False,
|
64 |
-
verbose=
|
65 |
llm=llm
|
66 |
)
|
67 |
|
@@ -72,7 +72,7 @@ writer = Agent(
|
|
72 |
"Using the research from the Planner and data from the Analyst, craft a professional document summarizing patent insights for {stakeholder}."
|
73 |
),
|
74 |
allow_delegation=False,
|
75 |
-
verbose=
|
76 |
llm=llm
|
77 |
)
|
78 |
|
@@ -83,7 +83,7 @@ analyst = Agent(
|
|
83 |
"Analyze patent filing data and innovation trends in {topic} to provide statistical insights. Your analysis will guide the Writer's final report."
|
84 |
),
|
85 |
allow_delegation=False,
|
86 |
-
verbose=
|
87 |
llm=llm
|
88 |
)
|
89 |
|
@@ -126,7 +126,7 @@ analyse = Task(
|
|
126 |
crew = Crew(
|
127 |
agents=[planner, analyst, writer],
|
128 |
tasks=[plan, analyse, write],
|
129 |
-
verbose=
|
130 |
)
|
131 |
|
132 |
def generate_pdf_report(result):
|
@@ -154,6 +154,9 @@ def create_visualizations(analyst_output):
|
|
154 |
"""Create visualizations for advanced insights."""
|
155 |
if enable_custom_visualization and analyst_output:
|
156 |
try:
|
|
|
|
|
|
|
157 |
# Validate and format analyst output
|
158 |
if isinstance(analyst_output, list) and all(isinstance(item, dict) for item in analyst_output):
|
159 |
data = pd.DataFrame(analyst_output)
|
@@ -172,6 +175,9 @@ def display_table(analyst_output):
|
|
172 |
"""Display tabular data for detailed insights."""
|
173 |
if analyst_output and isinstance(analyst_output, list):
|
174 |
try:
|
|
|
|
|
|
|
175 |
data = pd.DataFrame(analyst_output)
|
176 |
st.markdown("### Data Table")
|
177 |
st.dataframe(data)
|
|
|
61 |
"You're tasked with researching {topic} patents and identifying key trends and players. Your work supports the Patent Writer and Data Analyst."
|
62 |
),
|
63 |
allow_delegation=False,
|
64 |
+
verbose=True,
|
65 |
llm=llm
|
66 |
)
|
67 |
|
|
|
72 |
"Using the research from the Planner and data from the Analyst, craft a professional document summarizing patent insights for {stakeholder}."
|
73 |
),
|
74 |
allow_delegation=False,
|
75 |
+
verbose=True,
|
76 |
llm=llm
|
77 |
)
|
78 |
|
|
|
83 |
"Analyze patent filing data and innovation trends in {topic} to provide statistical insights. Your analysis will guide the Writer's final report."
|
84 |
),
|
85 |
allow_delegation=False,
|
86 |
+
verbose=True,
|
87 |
llm=llm
|
88 |
)
|
89 |
|
|
|
126 |
crew = Crew(
|
127 |
agents=[planner, analyst, writer],
|
128 |
tasks=[plan, analyse, write],
|
129 |
+
verbose=True
|
130 |
)
|
131 |
|
132 |
def generate_pdf_report(result):
|
|
|
154 |
"""Create visualizations for advanced insights."""
|
155 |
if enable_custom_visualization and analyst_output:
|
156 |
try:
|
157 |
+
st.markdown("#### Debugging Analyst Output")
|
158 |
+
st.write(analyst_output)
|
159 |
+
|
160 |
# Validate and format analyst output
|
161 |
if isinstance(analyst_output, list) and all(isinstance(item, dict) for item in analyst_output):
|
162 |
data = pd.DataFrame(analyst_output)
|
|
|
175 |
"""Display tabular data for detailed insights."""
|
176 |
if analyst_output and isinstance(analyst_output, list):
|
177 |
try:
|
178 |
+
st.markdown("#### Debugging Analyst Output for Table")
|
179 |
+
st.write(analyst_output)
|
180 |
+
|
181 |
data = pd.DataFrame(analyst_output)
|
182 |
st.markdown("### Data Table")
|
183 |
st.dataframe(data)
|