Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,6 +70,15 @@ class ESRS_info_tool(Tool):
|
|
| 70 |
############################################################################################
|
| 71 |
############################################################################################
|
| 72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
model = HfApiModel("Qwen/Qwen2.5-Coder-32B-Instruct")
|
| 74 |
|
| 75 |
retriever_tool = Chroma_retrieverTool()
|
|
@@ -86,14 +95,6 @@ agent = CodeAgent(
|
|
| 86 |
)
|
| 87 |
|
| 88 |
|
| 89 |
-
def respond(message):
|
| 90 |
-
system_prompt_added = """You are an expert in environmental and corporate social responsibility. You must respond to requests using the query function in the document database.
|
| 91 |
-
User's question : """
|
| 92 |
-
agent_output = agent.run(system_prompt_added+"""Find all informations about the ESRS E1–5: Energy consumption from fossil sources in Sartorius documents.""")
|
| 93 |
-
|
| 94 |
-
yield agent_output
|
| 95 |
-
|
| 96 |
-
|
| 97 |
"""
|
| 98 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 99 |
"""
|
|
|
|
| 70 |
############################################################################################
|
| 71 |
############################################################################################
|
| 72 |
|
| 73 |
+
def respond(message):
|
| 74 |
+
system_prompt_added = """You are an expert in environmental and corporate social responsibility. You must respond to requests using the query function in the document database.
|
| 75 |
+
User's question : """
|
| 76 |
+
agent_output = agent.run(system_prompt_added + message)
|
| 77 |
+
|
| 78 |
+
yield agent_output
|
| 79 |
+
|
| 80 |
+
############################################################################################
|
| 81 |
+
|
| 82 |
model = HfApiModel("Qwen/Qwen2.5-Coder-32B-Instruct")
|
| 83 |
|
| 84 |
retriever_tool = Chroma_retrieverTool()
|
|
|
|
| 95 |
)
|
| 96 |
|
| 97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
"""
|
| 99 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 100 |
"""
|