Spaces:
Running
Running
Update app/webui/process.py
Browse files- app/webui/process.py +9 -11
app/webui/process.py
CHANGED
@@ -165,10 +165,10 @@ def translator_sec(
|
|
165 |
init_translation = one_chunk_initial_translation(
|
166 |
source_lang, target_lang, source_text
|
167 |
)
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
|
173 |
progress((2,3), desc="Reflecton...")
|
174 |
reflection = one_chunk_reflect_on_translation(
|
@@ -211,14 +211,12 @@ def translator_sec(
|
|
211 |
translation_1_chunks = multichunk_initial_translation(
|
212 |
source_lang, target_lang, source_text_chunks
|
213 |
)
|
214 |
-
|
|
|
|
|
|
|
|
|
215 |
init_translation = "".join(translation_1_chunks)
|
216 |
-
|
217 |
-
try:
|
218 |
-
model_load(endpoint2, model2, api_key2, context_window, num_output)
|
219 |
-
except Exception as e:
|
220 |
-
raise gr.Error(f"An unexpected error occurred: {e}")
|
221 |
-
|
222 |
progress((4,5), desc="Reflection...")
|
223 |
reflection_chunks = multichunk_reflect_on_translation(
|
224 |
source_lang,
|
|
|
165 |
init_translation = one_chunk_initial_translation(
|
166 |
source_lang, target_lang, source_text
|
167 |
)
|
168 |
+
try:
|
169 |
+
model_load(endpoint2, model2, api_key2, context_window, num_output)
|
170 |
+
except Exception as e:
|
171 |
+
raise gr.Error(f"An unexpected error occurred: {e}")
|
172 |
|
173 |
progress((2,3), desc="Reflecton...")
|
174 |
reflection = one_chunk_reflect_on_translation(
|
|
|
211 |
translation_1_chunks = multichunk_initial_translation(
|
212 |
source_lang, target_lang, source_text_chunks
|
213 |
)
|
214 |
+
try:
|
215 |
+
model_load(endpoint2, model2, api_key2, context_window, num_output)
|
216 |
+
except Exception as e:
|
217 |
+
raise gr.Error(f"An unexpected error occurred: {e}")
|
218 |
+
|
219 |
init_translation = "".join(translation_1_chunks)
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
progress((4,5), desc="Reflection...")
|
221 |
reflection_chunks = multichunk_reflect_on_translation(
|
222 |
source_lang,
|