Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,10 +56,11 @@ def main(message: str):
|
|
| 56 |
cl.Message(content="Invalid input. Please enter a number.").send()
|
| 57 |
return
|
| 58 |
|
| 59 |
-
|
|
|
|
| 60 |
|
| 61 |
# Split the text into chunks
|
| 62 |
-
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=
|
| 63 |
chunks = text_splitter.split_text(paper_text)
|
| 64 |
|
| 65 |
# Create embeddings and vector store, include chunk-specific metadata
|
|
|
|
| 56 |
cl.Message(content="Invalid input. Please enter a number.").send()
|
| 57 |
return
|
| 58 |
|
| 59 |
+
# Download the entire paper content (if available)
|
| 60 |
+
paper_text = f"{selected_paper.title}\n\n{selected_paper.summary}\n\n{selected_paper.comment}"
|
| 61 |
|
| 62 |
# Split the text into chunks
|
| 63 |
+
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
|
| 64 |
chunks = text_splitter.split_text(paper_text)
|
| 65 |
|
| 66 |
# Create embeddings and vector store, include chunk-specific metadata
|