Saptadip Sarkar
commited on
Commit
·
51659ba
1
Parent(s):
e890401
fix: updated agent code and requirements
Browse files- app.py +2 -2
- requirements.txt +3 -0
app.py
CHANGED
@@ -18,7 +18,7 @@ class BasicAgent:
|
|
18 |
def __init__(self):
|
19 |
print("BasicAgent initialized.")
|
20 |
llm = HuggingFaceLLM(model_name="Qwen/Qwen2.5-Coder-32B-Instruct")
|
21 |
-
agent = AgentWorkflow.from_tools_or_functions([
|
22 |
tools.wiki_tool,
|
23 |
tools.ddgo_tool
|
24 |
],
|
@@ -28,7 +28,7 @@ class BasicAgent:
|
|
28 |
|
29 |
def __call__(self, question: str) -> str:
|
30 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
31 |
-
fixed_answer =
|
32 |
print(f"Agent returning fixed answer: {fixed_answer}")
|
33 |
return fixed_answer
|
34 |
|
|
|
18 |
def __init__(self):
|
19 |
print("BasicAgent initialized.")
|
20 |
llm = HuggingFaceLLM(model_name="Qwen/Qwen2.5-Coder-32B-Instruct")
|
21 |
+
self.agent = AgentWorkflow.from_tools_or_functions([
|
22 |
tools.wiki_tool,
|
23 |
tools.ddgo_tool
|
24 |
],
|
|
|
28 |
|
29 |
def __call__(self, question: str) -> str:
|
30 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
31 |
+
fixed_answer = self.agent.run(question)
|
32 |
print(f"Agent returning fixed answer: {fixed_answer}")
|
33 |
return fixed_answer
|
34 |
|
requirements.txt
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
gradio
|
|
|
|
|
2 |
requests
|
|
|
3 |
llama-index
|
4 |
llama-index-tools-wikipedia
|
5 |
llama-index-llms-litellm
|
|
|
1 |
gradio
|
2 |
+
pandas
|
3 |
+
torch
|
4 |
requests
|
5 |
+
transformers
|
6 |
llama-index
|
7 |
llama-index-tools-wikipedia
|
8 |
llama-index-llms-litellm
|