perkan commited on
Commit
bea601e
1 Parent(s): 81ed170

[FIX] =. adding transalte_text handler function for calling translations

Browse files
Files changed (1) hide show
  1. app.py +5 -0
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.")