Spaces:
Runtime error
Runtime error
abcde1234www
commited on
Commit
•
b840811
1
Parent(s):
be68597
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ from transformers import GPT2TokenizerFast
|
|
10 |
import gradio as gr
|
11 |
|
12 |
# get API key from top-right dropdown on OpenAI website
|
13 |
-
openai.api_key = os.getenv("
|
14 |
|
15 |
EMBEDDING_MODEL = "text-embedding-ada-002"
|
16 |
COMPLETIONS_MODEL = "text-davinci-003"
|
@@ -26,7 +26,7 @@ hf_ds = "juancopi81/yannic_ada_embeddings"
|
|
26 |
tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")
|
27 |
|
28 |
HEADER = """Answer the question as truthfully as possible using the provided context, and if the answer is not contained within the text below, say "This is not covered in my videos." Try imitating the style of the provided context. \n\nContext:\n"""
|
29 |
-
RESPONSE_SOURCES = "
|
30 |
|
31 |
# query separator to help the model distinguish between separate pieces of text.
|
32 |
SEPARATOR = "\n* "
|
|
|
10 |
import gradio as gr
|
11 |
|
12 |
# get API key from top-right dropdown on OpenAI website
|
13 |
+
openai.api_key = os.getenv("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")
|
14 |
|
15 |
EMBEDDING_MODEL = "text-embedding-ada-002"
|
16 |
COMPLETIONS_MODEL = "text-davinci-003"
|
|
|
26 |
tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")
|
27 |
|
28 |
HEADER = """Answer the question as truthfully as possible using the provided context, and if the answer is not contained within the text below, say "This is not covered in my videos." Try imitating the style of the provided context. \n\nContext:\n"""
|
29 |
+
RESPONSE_SOURCES = ""
|
30 |
|
31 |
# query separator to help the model distinguish between separate pieces of text.
|
32 |
SEPARATOR = "\n* "
|