Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ import re
|
|
10 |
from langchain.docstore.document import Document
|
11 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
12 |
from langchain_community.retrievers import BM25Retriever
|
13 |
-
from smolagents import CodeAgent, HfApiModel, DuckDuckGoSearchTool
|
14 |
import gradio as gr
|
15 |
import logging
|
16 |
from nltk.corpus import words
|
@@ -174,7 +174,7 @@ When answering:
|
|
174 |
"""
|
175 |
|
176 |
# Define the agent using smolagents
|
177 |
-
model =
|
178 |
agent = CodeAgent(
|
179 |
tools=[retriever_tool, duckduckgo_search_tool], model=model, max_iterations=4, verbose=True
|
180 |
)
|
|
|
10 |
from langchain.docstore.document import Document
|
11 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
12 |
from langchain_community.retrievers import BM25Retriever
|
13 |
+
from smolagents import CodeAgent, HfApiModel, DuckDuckGoSearchTool , Tool ,LiteLLMModel
|
14 |
import gradio as gr
|
15 |
import logging
|
16 |
from nltk.corpus import words
|
|
|
174 |
"""
|
175 |
|
176 |
# Define the agent using smolagents
|
177 |
+
model = LiteLLMModel("groq/llama3-8b-8192") # Ensure the model is available
|
178 |
agent = CodeAgent(
|
179 |
tools=[retriever_tool, duckduckgo_search_tool], model=model, max_iterations=4, verbose=True
|
180 |
)
|