Skip to content

Commit

Permalink
ditched warnings and empty messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasByr committed Oct 24, 2023
1 parent 28d561f commit 8e8598c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ def build_response(message: str):
return model.get_build_response(message)

def send_message_click(_):
if not new_message.value or new_message.value.isspace():
return
page.pubsub.send_all(
Message(
user_name=page.session.get("user"),
Expand Down Expand Up @@ -275,6 +277,7 @@ def route_change(_):
if page.route == "/chat":
if page.session.contains_key("user"):
page.clean()
close_banner(None)
page.add(
ft.Row(
[
Expand Down
3 changes: 3 additions & 0 deletions src/bot/model.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import logging
import warnings

import torch
from random import choice
Expand All @@ -14,6 +15,8 @@

__all__ = ["Model"]

warnings.filterwarnings("ignore")


class Model:
name = "camembert_sfp" # classifier
Expand Down

0 comments on commit 8e8598c

Please sign in to comment.