Spaces:
Sleeping
Sleeping
Update app.py
Browse filesKey Changes:
Fixed Import Issues:
Replaced import Document with from docx import Document for correct Word document handling.
Proper Tool Decorator Usage:
Applied
@tool
decorator directly to the generate_automation_report function instead of the class.
Added Report Tool to Agent:
Included generate_automation_report in the agent's tools list to make it accessible within the workflow.
Defined Missing Dependencies:
Added a placeholder for prompt_templates (adjust as per your agent's requirements).
Simplified Class Structure:
Converted the report generation into a standalone tool function for easier integration with the agent's tool system.
app.py
CHANGED
@@ -9,7 +9,7 @@ from Gradio_UI import GradioUI
|
|
9 |
# Tool to generate the RPA automation report
|
10 |
@tool
|
11 |
def generate_automation_report(case_description: str) -> str:
|
12 |
-
"""Generates a structured Word report for RPA suitability analysis."""
|
13 |
doc = Document()
|
14 |
doc.add_heading('Automation Suitability & Requirements Report', 0)
|
15 |
doc.add_heading('Case Description', 1)
|
|
|
9 |
# Tool to generate the RPA automation report
|
10 |
@tool
|
11 |
def generate_automation_report(case_description: str) -> str:
|
12 |
+
""" Generates a structured Word report for RPA suitability analysis."""
|
13 |
doc = Document()
|
14 |
doc.add_heading('Automation Suitability & Requirements Report', 0)
|
15 |
doc.add_heading('Case Description', 1)
|