PierreBrunelle
commited on
Commit
•
650714a
1
Parent(s):
2d2f853
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,11 @@ from pixeltable.functions.huggingface import sentence_transformer
|
|
7 |
from pixeltable.functions import openai
|
8 |
import os
|
9 |
|
|
|
|
|
|
|
|
|
|
|
10 |
# Ensure a clean slate for the demo
|
11 |
pxt.drop_dir('rag_demo', force=True)
|
12 |
pxt.create_dir('rag_demo')
|
|
|
7 |
from pixeltable.functions import openai
|
8 |
import os
|
9 |
|
10 |
+
"""## Store OpenAI API Key"""
|
11 |
+
|
12 |
+
if 'OPENAI_API_KEY' not in os.environ:
|
13 |
+
os.environ['OPENAI_API_KEY'] = getpass.getpass('Enter your OpenAI API key:')
|
14 |
+
|
15 |
# Ensure a clean slate for the demo
|
16 |
pxt.drop_dir('rag_demo', force=True)
|
17 |
pxt.create_dir('rag_demo')
|