Spaces:
Runtime error
Runtime error
update app.py
Browse files
app.py
CHANGED
@@ -12,10 +12,6 @@ import os
|
|
12 |
from dotenv import load_dotenv
|
13 |
import tempfile
|
14 |
|
15 |
-
# Set replicate API token as environment variable
|
16 |
-
replicate_api_token = "r8_AA3K1fhDykqLa5M74E5V0w5ss1z0P9S3foWJl"
|
17 |
-
os.environ["REPLICATE_API_TOKEN"] = replicate_api_token
|
18 |
-
|
19 |
load_dotenv()
|
20 |
|
21 |
def initialize_session_state():
|
@@ -52,6 +48,9 @@ def display_chat_history(chain):
|
|
52 |
message(st.session_state["generated"][i], key=str(i), avatar_style="fun-emoji")
|
53 |
|
54 |
def create_conversational_chain(vector_store):
|
|
|
|
|
|
|
55 |
llm = Replicate(
|
56 |
streaming=True,
|
57 |
model="replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781",
|
|
|
12 |
from dotenv import load_dotenv
|
13 |
import tempfile
|
14 |
|
|
|
|
|
|
|
|
|
15 |
load_dotenv()
|
16 |
|
17 |
def initialize_session_state():
|
|
|
48 |
message(st.session_state["generated"][i], key=str(i), avatar_style="fun-emoji")
|
49 |
|
50 |
def create_conversational_chain(vector_store):
|
51 |
+
replicate_api_token = "r8_AA3K1fhDykqLa5M74E5V0w5ss1z0P9S3foWJl" # Replace with your actual token
|
52 |
+
os.environ["REPLICATE_API_TOKEN"] = replicate_api_token
|
53 |
+
|
54 |
llm = Replicate(
|
55 |
streaming=True,
|
56 |
model="replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781",
|