text: seeing if output message works
Browse files
app.py
CHANGED
|
@@ -87,7 +87,7 @@ async def on_chat_start():
|
|
| 87 |
# Wait for the user to upload a file
|
| 88 |
while not files:
|
| 89 |
files = await cl.AskFileMessage(
|
| 90 |
-
content="Please upload a .txt or .pdf file to begin!",
|
| 91 |
accept=["text/plain", "application/pdf"],
|
| 92 |
max_size_mb=2,
|
| 93 |
timeout=180,
|
|
@@ -103,6 +103,11 @@ async def on_chat_start():
|
|
| 103 |
# load the file
|
| 104 |
texts = process_text_file(file)
|
| 105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
print(f"Processing {len(texts)} text chunks")
|
| 107 |
|
| 108 |
# Create a dict vector store
|
|
|
|
| 87 |
# Wait for the user to upload a file
|
| 88 |
while not files:
|
| 89 |
files = await cl.AskFileMessage(
|
| 90 |
+
content="Please upload a .txt or .pdf file to begin processing!",
|
| 91 |
accept=["text/plain", "application/pdf"],
|
| 92 |
max_size_mb=2,
|
| 93 |
timeout=180,
|
|
|
|
| 103 |
# load the file
|
| 104 |
texts = process_text_file(file)
|
| 105 |
|
| 106 |
+
msg = cl.Message(
|
| 107 |
+
content=f"Resulted in {len(texts)} chunks", disable_human_feedback=True
|
| 108 |
+
)
|
| 109 |
+
await msg.send()
|
| 110 |
+
|
| 111 |
print(f"Processing {len(texts)} text chunks")
|
| 112 |
|
| 113 |
# Create a dict vector store
|