alanchan808 commited on
Commit
115129b
·
1 Parent(s): 0a57d81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -9
app.py CHANGED
@@ -24,7 +24,6 @@ pinecone.init(api_key=PINECONE_API_KEY, environment=PINECONE_ENV)
24
  from langchain.llms import GooglePalm
25
  from langchain.chains import RetrievalQAWithSourcesChain
26
  llm=GooglePalm(google_api_key=GOOGLE_API_KEY, temperature=1, max_output_tokens=2048)
27
- '''
28
  vectorStore = Pinecone.from_existing_index('tennis', instructor_embeddings)
29
  retriever = vectorStore.as_retriever(search_kwargs={"k": 3})
30
  qa_chain_instrucEmbed = RetrievalQAWithSourcesChain.from_chain_type(llm=llm,
@@ -33,8 +32,6 @@ qa_chain_instrucEmbed = RetrievalQAWithSourcesChain.from_chain_type(llm=llm,
33
  return_source_documents=True,
34
  verbose=True
35
  )
36
- '''
37
- qa_chain_instrucEmbed = None
38
 
39
  theme = gr.themes.Monochrome(
40
  primary_hue="indigo",
@@ -49,12 +46,6 @@ theme = gr.themes.Monochrome(
49
  ],
50
  )
51
 
52
- YOUTUBE_VIDEO_EMBED_HTML='''
53
- <iframe width="560" height="315" src="https://www.youtube.com/embed/lsVNAh7X_i8"
54
- title="YouTube video player" frameborder="0" allow="accelerometer; autoplay;
55
- clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
56
- '''
57
-
58
  def generate(question):
59
  ret = qa_chain_instrucEmbed(question)
60
  print(str(ret))
 
24
  from langchain.llms import GooglePalm
25
  from langchain.chains import RetrievalQAWithSourcesChain
26
  llm=GooglePalm(google_api_key=GOOGLE_API_KEY, temperature=1, max_output_tokens=2048)
 
27
  vectorStore = Pinecone.from_existing_index('tennis', instructor_embeddings)
28
  retriever = vectorStore.as_retriever(search_kwargs={"k": 3})
29
  qa_chain_instrucEmbed = RetrievalQAWithSourcesChain.from_chain_type(llm=llm,
 
32
  return_source_documents=True,
33
  verbose=True
34
  )
 
 
35
 
36
  theme = gr.themes.Monochrome(
37
  primary_hue="indigo",
 
46
  ],
47
  )
48
 
 
 
 
 
 
 
49
  def generate(question):
50
  ret = qa_chain_instrucEmbed(question)
51
  print(str(ret))