Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ purs=st.button("gotcha", disabled=not any(url.strip() for url in urs))
|
|
| 44 |
if purs:
|
| 45 |
|
| 46 |
urs = [url.strip() for url in urs if url.strip()]
|
| 47 |
-
|
| 48 |
mp.text("Loading..URl..Loader....☑️☑️☑️")
|
| 49 |
valid_urls = [url for url in urs if url.strip()]
|
| 50 |
if not valid_urls:
|
|
@@ -64,8 +64,7 @@ if purs:
|
|
| 64 |
mp.text("Loading..txt..splitter....☑️☑️☑️")
|
| 65 |
tot=RecursiveCharacterTextSplitter.from_tiktoken_encoder(encoding_name="cl100k_base",chunk_size=512,chunk_overlap=16)
|
| 66 |
doccs=tot.split_documents(docs)
|
| 67 |
-
|
| 68 |
-
st.write(doccs)
|
| 69 |
mp.text("Loading..VB...☑️☑️☑️")
|
| 70 |
vv=Chroma.from_documents(doccs,m1)
|
| 71 |
r2=vv.as_retriever(search_type="similarity",search_kwargs={"k":4})
|
|
|
|
| 44 |
if purs:
|
| 45 |
|
| 46 |
urs = [url.strip() for url in urs if url.strip()]
|
| 47 |
+
|
| 48 |
mp.text("Loading..URl..Loader....☑️☑️☑️")
|
| 49 |
valid_urls = [url for url in urs if url.strip()]
|
| 50 |
if not valid_urls:
|
|
|
|
| 64 |
mp.text("Loading..txt..splitter....☑️☑️☑️")
|
| 65 |
tot=RecursiveCharacterTextSplitter.from_tiktoken_encoder(encoding_name="cl100k_base",chunk_size=512,chunk_overlap=16)
|
| 66 |
doccs=tot.split_documents(docs)
|
| 67 |
+
|
|
|
|
| 68 |
mp.text("Loading..VB...☑️☑️☑️")
|
| 69 |
vv=Chroma.from_documents(doccs,m1)
|
| 70 |
r2=vv.as_retriever(search_type="similarity",search_kwargs={"k":4})
|