import gradio as gr from llamafactory.chat import ChatModel from llamafactory.extras.misc import torch_gc import re def split_into_sentences(text): sentence_endings = re.compile(r'(?