Spaces:
Paused
Paused
in-place edit of app.py
Browse files
app.py
CHANGED
|
@@ -21,13 +21,14 @@ def rename(orig_author: str):
|
|
| 21 |
|
| 22 |
@cl.on_message
|
| 23 |
async def main(message: cl.Message):
|
| 24 |
-
await cl.Message(f"Processing `{message.content}`", disable_human_feedback=True)
|
| 25 |
if message.content.startswith("http://") or message.content.startswith("https://"):
|
| 26 |
message_type = "url"
|
| 27 |
else:
|
| 28 |
message_type = "question"
|
| 29 |
|
| 30 |
if message_type == "url":
|
|
|
|
| 31 |
try:
|
| 32 |
# Run the document loading and splitting in a thread
|
| 33 |
docs = await asyncio.to_thread(load_documents_from_url, message.content)
|
|
|
|
| 21 |
|
| 22 |
@cl.on_message
|
| 23 |
async def main(message: cl.Message):
|
| 24 |
+
# await cl.Message(f"Processing `{message.content}`", disable_human_feedback=True)
|
| 25 |
if message.content.startswith("http://") or message.content.startswith("https://"):
|
| 26 |
message_type = "url"
|
| 27 |
else:
|
| 28 |
message_type = "question"
|
| 29 |
|
| 30 |
if message_type == "url":
|
| 31 |
+
await cl.Message(content=f"Processing `{message.content}`", disable_human_feedback=True).send()
|
| 32 |
try:
|
| 33 |
# Run the document loading and splitting in a thread
|
| 34 |
docs = await asyncio.to_thread(load_documents_from_url, message.content)
|