Spaces:
Running
on
Zero
Running
on
Zero
Serhiy Stetskovych
commited on
Commit
·
802f6d4
1
Parent(s):
f822986
Decrese max text length for generation
Browse files
app.py
CHANGED
|
@@ -1,6 +1,4 @@
|
|
| 1 |
-
import torch
|
| 2 |
import gradio as gr
|
| 3 |
-
|
| 4 |
from infer import inference
|
| 5 |
|
| 6 |
|
|
@@ -15,8 +13,8 @@ description = f'''
|
|
| 15 |
def synthesise(text, speed, progress=gr.Progress()):
|
| 16 |
if text.strip() == "":
|
| 17 |
raise gr.Error("You must enter some text")
|
| 18 |
-
if len(text) >
|
| 19 |
-
raise gr.Error("Text must be <
|
| 20 |
print("*** saying ***")
|
| 21 |
print(text)
|
| 22 |
print("*** end ***")
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
from infer import inference
|
| 3 |
|
| 4 |
|
|
|
|
| 13 |
def synthesise(text, speed, progress=gr.Progress()):
|
| 14 |
if text.strip() == "":
|
| 15 |
raise gr.Error("You must enter some text")
|
| 16 |
+
if len(text) > 50000:
|
| 17 |
+
raise gr.Error("Text must be <50k characters")
|
| 18 |
print("*** saying ***")
|
| 19 |
print(text)
|
| 20 |
print("*** end ***")
|