Spaces:
Sleeping
Sleeping
add chunk size function
Browse files
app.py
CHANGED
@@ -173,6 +173,9 @@ def basic_translate(source_sentence, src_language, tgt_language):
|
|
173 |
return translations
|
174 |
|
175 |
def summary_translate(src_text, temp_tgt_text, tgt_language, session_id):
|
|
|
|
|
|
|
176 |
system_prompts = ["You are a helpful rephraser. You only output the rephrased result."]
|
177 |
translations = []
|
178 |
for prompt_style in system_prompts:
|
|
|
173 |
return translations
|
174 |
|
175 |
def summary_translate(src_text, temp_tgt_text, tgt_language, session_id):
|
176 |
+
if len(temp_tgt_text.strip()) == 0:
|
177 |
+
return "", 0
|
178 |
+
|
179 |
system_prompts = ["You are a helpful rephraser. You only output the rephrased result."]
|
180 |
translations = []
|
181 |
for prompt_style in system_prompts:
|