Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -72,7 +72,12 @@ def rename(orig_author: str):
|
|
72 |
return "Marketing Assistant"
|
73 |
|
74 |
@cl.on_message
|
75 |
-
async def main(message: cl.Message
|
|
|
|
|
|
|
|
|
|
|
76 |
if message_type == "url":
|
77 |
# load the file
|
78 |
docs = load_documents_from_url(message.content)
|
|
|
72 |
return "Marketing Assistant"
|
73 |
|
74 |
@cl.on_message
|
75 |
+
async def main(message: cl.Message):
|
76 |
+
if message.content.startswith("http://") or message.content.startswith("https://"):
|
77 |
+
message_type = "url"
|
78 |
+
else:
|
79 |
+
message_type = "question"
|
80 |
+
|
81 |
if message_type == "url":
|
82 |
# load the file
|
83 |
docs = load_documents_from_url(message.content)
|