Spaces:
elioonpc
/
Runtime error

gorkemgoknar commited on
Commit
ddd9ee2
1 Parent(s): 8f7b4cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -18,6 +18,7 @@ import base64
18
  import csv
19
  from io import StringIO
20
  import datetime
 
21
 
22
  import gradio as gr
23
  from scipy.io.wavfile import write
@@ -235,6 +236,9 @@ def predict(
235
 
236
  latent_calculation_time = time.time() - t_latent
237
  # metrics_text=f"Embedding calculation time: {latent_calculation_time:.2f} seconds\n"
 
 
 
238
 
239
  wav_chunks = []
240
  ## Direct mode
 
18
  import csv
19
  from io import StringIO
20
  import datetime
21
+ import re
22
 
23
  import gradio as gr
24
  from scipy.io.wavfile import write
 
236
 
237
  latent_calculation_time = time.time() - t_latent
238
  # metrics_text=f"Embedding calculation time: {latent_calculation_time:.2f} seconds\n"
239
+
240
+ # temporary comma fix
241
+ prompt= re.sub("([^\x00-\x7F]|\w)(\.|\。|\?)",r"\1 \2",prompt)
242
 
243
  wav_chunks = []
244
  ## Direct mode