Style improvements (#1957)
This commit is contained in:
parent
334486f527
commit
3913155c1f
23 changed files with 64 additions and 50 deletions
|
@ -4,6 +4,7 @@ from pathlib import Path
|
|||
|
||||
import gradio as gr
|
||||
import torch
|
||||
|
||||
from extensions.silero_tts import tts_preprocessor
|
||||
from modules import chat, shared
|
||||
from modules.html_generator import chat_html_wrapper
|
||||
|
@ -216,4 +217,4 @@ def ui():
|
|||
|
||||
# Play preview
|
||||
preview_text.submit(voice_preview, preview_text, preview_audio)
|
||||
preview_play.click(voice_preview, preview_text, preview_audio)
|
||||
preview_play.click(voice_preview, preview_text, preview_audio)
|
||||
|
|
|
@ -2,7 +2,6 @@ import time
|
|||
from pathlib import Path
|
||||
|
||||
import torch
|
||||
|
||||
import tts_preprocessor
|
||||
|
||||
torch._C._jit_set_profiling_mode(False)
|
||||
|
|
|
@ -69,7 +69,7 @@ def remove_surrounded_chars(string):
|
|||
# first this expression will check if there is a string nested exclusively between a alt=
|
||||
# and a style= string. This would correspond to only a the alt text of an embedded image
|
||||
# If it matches it will only keep that part as the string, and rend it for further processing
|
||||
# Afterwards this expression matches to 'as few symbols as possible (0 upwards) between any
|
||||
# Afterwards this expression matches to 'as few symbols as possible (0 upwards) between any
|
||||
# asterisks' OR' as few symbols as possible (0 upwards) between an asterisk and the end of the string'
|
||||
if re.search(r'(?<=alt=)(.*)(?=style=)', string, re.DOTALL):
|
||||
m = re.search(r'(?<=alt=)(.*)(?=style=)', string, re.DOTALL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue