6yuru99's picture
Update app.py
9a950fb verified
raw
history blame
420 Bytes
import streamlit as st
from translation_model import translator
st.title("Medical Translation (en/zh)")
text_input = st.text_area("Enter your text:")
translation_direction = st.selectbox("Translate to", ["English -> Chinese", "Chinese -> English"])
if st.button("Translate"):
translated_text = translator.translate(text_input, translation_direction)
st.subheader("Output:")
st.write(translated_text)