alakxender
commited on
Commit
•
6c65cf7
1
Parent(s):
4f1d3e3
short
Browse files
app.py
CHANGED
@@ -26,6 +26,9 @@ summary_type = {
|
|
26 |
|
27 |
@spaces.GPU
|
28 |
def translate_text(text, s_type):
|
|
|
|
|
|
|
29 |
if len(text) > 4999:
|
30 |
gr.Warning("Text is too long. Please enter a shorter text.")
|
31 |
return "Text is too long. Please enter a shorter text.", "", ""
|
|
|
26 |
|
27 |
@spaces.GPU
|
28 |
def translate_text(text, s_type):
|
29 |
+
if len(text) < 250:
|
30 |
+
gr.Warning("Text is too short. Please enter a longer text.")
|
31 |
+
return "Text is too short. Please enter a longer text.", "", ""
|
32 |
if len(text) > 4999:
|
33 |
gr.Warning("Text is too long. Please enter a shorter text.")
|
34 |
return "Text is too long. Please enter a shorter text.", "", ""
|