Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,9 +30,8 @@ text_splitter = RecursiveCharacterTextSplitter(
|
|
30 |
|
31 |
documents = text_splitter.split_documents(data)
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
print("Got embeddings")
|
36 |
#Input openai api key
|
37 |
# Check if the OpenAI API Key is empty
|
38 |
def check_api_key(api_key):
|
@@ -72,6 +71,8 @@ first_page = gr.Interface(fn=gradio_interface, inputs=api_key_input, title="Open
|
|
72 |
first_page.launch()
|
73 |
|
74 |
print("got API key")
|
|
|
|
|
75 |
#Load the model
|
76 |
llm = ChatOpenAI(temperature=0, model="gpt-3.5-turbo",openai_api_key=api_key_input)
|
77 |
|
|
|
30 |
|
31 |
documents = text_splitter.split_documents(data)
|
32 |
|
33 |
+
|
34 |
+
print("Got docs split")
|
|
|
35 |
#Input openai api key
|
36 |
# Check if the OpenAI API Key is empty
|
37 |
def check_api_key(api_key):
|
|
|
71 |
first_page.launch()
|
72 |
|
73 |
print("got API key")
|
74 |
+
# Create the embeddings
|
75 |
+
embeddings = OpenAIEmbeddings()
|
76 |
#Load the model
|
77 |
llm = ChatOpenAI(temperature=0, model="gpt-3.5-turbo",openai_api_key=api_key_input)
|
78 |
|