Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,7 +63,10 @@ vector_store = FAISS.from_texts(
|
|
| 63 |
metadatas=metadatas
|
| 64 |
)
|
| 65 |
# Step 5: Initialize the LLM
|
| 66 |
-
openai_api_key = os.getenv("tauhid") # Fetch the key using the actual secret name
|
|
|
|
|
|
|
|
|
|
| 67 |
if not openai_api_key:
|
| 68 |
raise ValueError("tauhid environment variable is not set. Please add it to the Space Secrets.")
|
| 69 |
|
|
|
|
| 63 |
metadatas=metadatas
|
| 64 |
)
|
| 65 |
# Step 5: Initialize the LLM
|
| 66 |
+
#openai_api_key = os.getenv("tauhid") # Fetch the key using the actual secret name
|
| 67 |
+
|
| 68 |
+
openai_api_key = os.getenv("tauhid")
|
| 69 |
+
client = OpenAI(api_key=api_key)
|
| 70 |
if not openai_api_key:
|
| 71 |
raise ValueError("tauhid environment variable is not set. Please add it to the Space Secrets.")
|
| 72 |
|