Spaces:
Runtime error
Runtime error
update app.py
Browse files
app.py
CHANGED
@@ -52,12 +52,14 @@ def display_chat_history(chain):
|
|
52 |
def create_conversational_chain(vector_store):
|
53 |
load_dotenv()
|
54 |
|
|
|
|
|
|
|
55 |
llm = Replicate(
|
56 |
streaming=True,
|
57 |
model="replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781",
|
58 |
callbacks=[StreamingStdOutCallbackHandler()],
|
59 |
-
input={"temperature": 0.01, "max_length": 500, "top_p": 1}
|
60 |
-
replicate_api_token=os.environ.get("r8_AA3K1fhDykqLa5M74E5V0w5ss1z0P9S3foWJl")
|
61 |
)
|
62 |
memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
|
63 |
|
|
|
52 |
def create_conversational_chain(vector_store):
|
53 |
load_dotenv()
|
54 |
|
55 |
+
replicate_api_token = "r8_AA3K1fhDykqLa5M74E5V0w5ss1z0P9S3foWJl" # Replace with your actual token
|
56 |
+
os.environ["REPLICATE_API_TOKEN"] = replicate_api_token
|
57 |
+
|
58 |
llm = Replicate(
|
59 |
streaming=True,
|
60 |
model="replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781",
|
61 |
callbacks=[StreamingStdOutCallbackHandler()],
|
62 |
+
input={"temperature": 0.01, "max_length": 500, "top_p": 1}
|
|
|
63 |
)
|
64 |
memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
|
65 |
|