nehatarey commited on
Commit
a606a61
·
1 Parent(s): c729c79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -30,9 +30,8 @@ text_splitter = RecursiveCharacterTextSplitter(
30
 
31
  documents = text_splitter.split_documents(data)
32
 
33
- # Create the embeddings
34
- embeddings = OpenAIEmbeddings()
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