Spaces:
Sleeping
Sleeping
SolomonHsu
commited on
Commit
•
9df882a
1
Parent(s):
ebc51ea
Update main.py
Browse files
main.py
CHANGED
@@ -751,12 +751,14 @@ def handle_text_message(event):
|
|
751 |
# chat = get_chat(event.source.user_id)
|
752 |
# response = chat.send_message(text).text
|
753 |
response = query({"inputs": text,"parameters":{"return_full_text":False,"max_length":1024}})
|
754 |
-
|
755 |
-
|
|
|
|
|
756 |
line_bot_api.reply_message(
|
757 |
ReplyMessageRequest(
|
758 |
reply_token=event.reply_token,
|
759 |
-
messages=[TextMessage(text=
|
760 |
)
|
761 |
)
|
762 |
|
|
|
751 |
# chat = get_chat(event.source.user_id)
|
752 |
# response = chat.send_message(text).text
|
753 |
response = query({"inputs": text,"parameters":{"return_full_text":False,"max_length":1024}})
|
754 |
+
|
755 |
+
app.logger.info("Got response with http status code: " + str(response))
|
756 |
+
# html_msg = markdown.markdown(response)
|
757 |
+
# soup = BeautifulSoup(html_msg, 'html.parser')
|
758 |
line_bot_api.reply_message(
|
759 |
ReplyMessageRequest(
|
760 |
reply_token=event.reply_token,
|
761 |
+
messages=[TextMessage(text=str(response))]
|
762 |
)
|
763 |
)
|
764 |
|