From 52549d1212b22b3d8045bdd5f8d274c6cfdabb91 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Mon, 8 Dec 2025 18:29:57 -0500 Subject: [PATCH] Ignore pytorch complaints --- libretranslate/app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libretranslate/app.py b/libretranslate/app.py index af0eafd..0265b00 100644 --- a/libretranslate/app.py +++ b/libretranslate/app.py @@ -5,6 +5,7 @@ import re import tempfile import uuid import sys +import warnings from datetime import datetime from functools import wraps from html import unescape @@ -37,6 +38,9 @@ from libretranslate.locales import ( from .api_keys import Database, RemoteDatabase from .suggestions import Database as SuggestionsDatabase +# Ignore pytorch complaints +warnings.simplefilter(action='ignore', category=FutureWarning) + # Rough map of emoji characters emojis = {e: True for e in \ [ord(' ')] + # Spaces