Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,6 +10,8 @@ from langchain.tools import DuckDuckGoSearchRun
|
|
| 10 |
from langchain_community.llms import HuggingFaceHub
|
| 11 |
from langchain_huggingface import HuggingFaceEndpoint
|
| 12 |
from langchain_community.chat_models import ChatHuggingFace
|
|
|
|
|
|
|
| 13 |
|
| 14 |
# (Keep Constants as is)
|
| 15 |
# --- Constants ---
|
|
@@ -44,7 +46,7 @@ class BasicAgent: # Some times Inheritance is needed
|
|
| 44 |
llm = ChatHuggingFace(
|
| 45 |
repo_id="tiiuae/falcon-7b-instruct",
|
| 46 |
huggingfacehub_api_token=os.environ["HUGGINGFACEHUB_API_TOKEN"],
|
| 47 |
-
|
| 48 |
)
|
| 49 |
|
| 50 |
# # Define the LLM
|
|
|
|
| 10 |
from langchain_community.llms import HuggingFaceHub
|
| 11 |
from langchain_huggingface import HuggingFaceEndpoint
|
| 12 |
from langchain_community.chat_models import ChatHuggingFace
|
| 13 |
+
from langchain.llms.base import LLM
|
| 14 |
+
from huggingface_hub import InferenceClient
|
| 15 |
|
| 16 |
# (Keep Constants as is)
|
| 17 |
# --- Constants ---
|
|
|
|
| 46 |
llm = ChatHuggingFace(
|
| 47 |
repo_id="tiiuae/falcon-7b-instruct",
|
| 48 |
huggingfacehub_api_token=os.environ["HUGGINGFACEHUB_API_TOKEN"],
|
| 49 |
+
llm={"temperature": 0.5, "max_new_tokens": 512}
|
| 50 |
)
|
| 51 |
|
| 52 |
# # Define the LLM
|