captain-awesome
commited on
Commit
•
dd6de71
1
Parent(s):
45abdcd
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ from transformers import pipeline
|
|
19 |
import os
|
20 |
import transformers
|
21 |
import torch
|
22 |
-
from langchain_community.llms import LlamaCpp
|
23 |
# from langchain_retrieval import BaseRetrieverChain
|
24 |
# from dotenv import load_dotenv
|
25 |
|
@@ -140,19 +140,19 @@ def get_response(user_input):
|
|
140 |
# task="text2text-generation",
|
141 |
# # model_kwargs={"temperature": 0.2},
|
142 |
# )
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
# llm = pipeline(task="conversational", model="facebook/blenderbot-400M-distill")
|
149 |
-
llm = LlamaCpp(
|
150 |
-
model_path="TheBloke/OpenOrca-Platypus2-13B-GGUF",
|
151 |
-
temperature=0.75,
|
152 |
-
max_tokens=2000,
|
153 |
-
top_p=1,
|
154 |
-
# callback_manager=callback_manager,
|
155 |
-
verbose=True, # Verbose is required to pass to the callback manager
|
156 |
)
|
157 |
|
158 |
# llm = HuggingFacePipeline.from_model_id(
|
|
|
19 |
import os
|
20 |
import transformers
|
21 |
import torch
|
22 |
+
# from langchain_community.llms import LlamaCpp
|
23 |
# from langchain_retrieval import BaseRetrieverChain
|
24 |
# from dotenv import load_dotenv
|
25 |
|
|
|
140 |
# task="text2text-generation",
|
141 |
# # model_kwargs={"temperature": 0.2},
|
142 |
# )
|
143 |
+
llm = HuggingFacePipeline.from_model_id(
|
144 |
+
model_id="google-t5/t5-small",
|
145 |
+
task="text2text-generation",
|
146 |
+
# model_kwargs={"temperature": 0.2},
|
147 |
+
)
|
148 |
# llm = pipeline(task="conversational", model="facebook/blenderbot-400M-distill")
|
149 |
+
# llm = LlamaCpp(
|
150 |
+
# model_path="TheBloke/OpenOrca-Platypus2-13B-GGUF",
|
151 |
+
# temperature=0.75,
|
152 |
+
# max_tokens=2000,
|
153 |
+
# top_p=1,
|
154 |
+
# # callback_manager=callback_manager,
|
155 |
+
# verbose=True, # Verbose is required to pass to the callback manager
|
156 |
)
|
157 |
|
158 |
# llm = HuggingFacePipeline.from_model_id(
|