Spaces:
Running
Running
[FIX] =. adding transalte_text handler function for calling translations
Browse files
app.py
CHANGED
@@ -49,6 +49,11 @@ def translate_fine_tuned(text, model):
|
|
49 |
except Exception as e:
|
50 |
return f"Error during translation: {e}"
|
51 |
|
|
|
|
|
|
|
|
|
|
|
52 |
# Create Gradio interface
|
53 |
with gr.Blocks() as demo:
|
54 |
gr.Markdown("# Translation Models\nTranslate text using base and fine-tuned models.")
|
|
|
49 |
except Exception as e:
|
50 |
return f"Error during translation: {e}"
|
51 |
|
52 |
+
def translate_text(text, model):
|
53 |
+
base_translation = translate_base(text)
|
54 |
+
fine_tuned_translation = translate_fine_tuned(text, model)
|
55 |
+
return base_translation, fine_tuned_translation
|
56 |
+
|
57 |
# Create Gradio interface
|
58 |
with gr.Blocks() as demo:
|
59 |
gr.Markdown("# Translation Models\nTranslate text using base and fine-tuned models.")
|