markytools commited on
Commit
c433c37
·
1 Parent(s): f988d10

updated pom file

Browse files
Files changed (1) hide show
  1. app.py +1 -11
app.py CHANGED
@@ -50,7 +50,7 @@ elif genre==radioButtonList[2]:
50
  pdfCSVURLText = "PDF"
51
  elif genre==radioButtonList[3]:
52
  pdfCSVURLText = "URL"
53
- urls = ['https://finance.yahoo.com/quote/GOOG/financials?p=GOOG']
54
  loader = [UnstructuredURLLoader(urls=urls)]
55
  index = VectorstoreIndexCreator(
56
  embedding=GooglePalmEmbeddings(),
@@ -123,15 +123,5 @@ if st.button(chatWithPDFButton, disabled=not enableChatBox and not chatTextStr):
123
  st.write(answer)
124
 
125
  elif genre==radioButtonList[4]: # Custom URL
126
- urls = [urlInput]
127
- loader = [UnstructuredURLLoader(urls=urls)]
128
- index = VectorstoreIndexCreator(
129
- embedding=GooglePalmEmbeddings(),
130
- text_splitter=CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)).from_loaders(loader)
131
-
132
- chain = RetrievalQA.from_chain_type(llm=llm,
133
- chain_type="stuff",
134
- retriever=index.vectorstore.as_retriever(),
135
- input_key="question")
136
  answer = chain.run(chatTextStr)
137
  st.write(answer)
 
50
  pdfCSVURLText = "PDF"
51
  elif genre==radioButtonList[3]:
52
  pdfCSVURLText = "URL"
53
+ urls = ['https://www.sec.gov/Archives/edgar/data/1652044/000165204422000071/goog-20220630.htm']
54
  loader = [UnstructuredURLLoader(urls=urls)]
55
  index = VectorstoreIndexCreator(
56
  embedding=GooglePalmEmbeddings(),
 
123
  st.write(answer)
124
 
125
  elif genre==radioButtonList[4]: # Custom URL
 
 
 
 
 
 
 
 
 
 
126
  answer = chain.run(chatTextStr)
127
  st.write(answer)