Spaces:
Running
on
Zero
Running
on
Zero
Update module_translation.py
Browse files- module_translation.py +2 -2
module_translation.py
CHANGED
@@ -6,7 +6,7 @@ Date: 2025-03-16
|
|
6 |
"""
|
7 |
|
8 |
import gradio as gr
|
9 |
-
import
|
10 |
from deep_translator import GoogleTranslator
|
11 |
|
12 |
tgt_language_codes = {
|
@@ -40,7 +40,7 @@ def translate_text(text, tgt_lang):
|
|
40 |
]
|
41 |
|
42 |
# Get the translation
|
43 |
-
yield from
|
44 |
|
45 |
def translate_text_with_google(text, tgt_lang):
|
46 |
"""Translate the given text into the given target language using Google Translate.
|
|
|
6 |
"""
|
7 |
|
8 |
import gradio as gr
|
9 |
+
import llm
|
10 |
from deep_translator import GoogleTranslator
|
11 |
|
12 |
tgt_language_codes = {
|
|
|
40 |
]
|
41 |
|
42 |
# Get the translation
|
43 |
+
yield from llm.stream_response(messages)
|
44 |
|
45 |
def translate_text_with_google(text, tgt_lang):
|
46 |
"""Translate the given text into the given target language using Google Translate.
|