File size: 420 Bytes
9a950fb
 
 
 
 
 
 
 
 
 
 
 
 
8542393
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)