Spaces:
Sleeping
Sleeping
Commit
·
552eb94
1
Parent(s):
993eec3
redis
Browse files
app.py
CHANGED
@@ -15,8 +15,16 @@ from langchain_core.runnables import RunnablePassthrough
|
|
15 |
@st.cache_resource
|
16 |
def load():
|
17 |
openai_api_key = os.getenv("OPENAI_API_KEY")
|
|
|
18 |
REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379")
|
19 |
-
redis_client = redis.from_url(REDIS_URL)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
|
22 |
|
|
|
15 |
@st.cache_resource
|
16 |
def load():
|
17 |
openai_api_key = os.getenv("OPENAI_API_KEY")
|
18 |
+
redis_pass = os.getenv("REDIS_PASS")
|
19 |
REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379")
|
20 |
+
# redis_client = redis.from_url(REDIS_URL)
|
21 |
+
redis_client = redis.Redis(
|
22 |
+
host='redis-14461.c264.ap-south-1-1.ec2.redns.redis-cloud.com',
|
23 |
+
port=14461,
|
24 |
+
decode_responses=True,
|
25 |
+
username="default",
|
26 |
+
password=redis_pass,
|
27 |
+
)
|
28 |
|
29 |
|
30 |
|