updated
Browse files
app.py
CHANGED
@@ -6,14 +6,24 @@ import torch
|
|
6 |
|
7 |
# Set the page configuration
|
8 |
st.set_page_config(
|
9 |
-
page_title="NMT",
|
10 |
-
page_icon=":robot_face:",
|
11 |
initial_sidebar_state="auto"
|
12 |
)
|
13 |
|
14 |
-
#
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
# Function to load the pre-trained model with caching
|
19 |
@st.cache_resource
|
@@ -36,7 +46,7 @@ if tokenizer and model:
|
|
36 |
# Add a subheader for "Source Text"
|
37 |
st.subheader("Source Text")
|
38 |
|
39 |
-
# Text area for user input with height set to 200
|
40 |
user_input = st.text_area("", "", height=200, max_chars=200) # no label text, to match the image
|
41 |
|
42 |
# Button for submitting the input
|
|
|
6 |
|
7 |
# Set the page configuration
|
8 |
st.set_page_config(
|
9 |
+
page_title="NMT",
|
10 |
+
page_icon=":robot_face:",
|
11 |
initial_sidebar_state="auto"
|
12 |
)
|
13 |
|
14 |
+
# Custom CSS for visible border in the text area
|
15 |
+
st.markdown(
|
16 |
+
"""
|
17 |
+
<style>
|
18 |
+
.stTextArea textarea {
|
19 |
+
border: 2px solid #ccc; /* Customize the border color and width */
|
20 |
+
border-radius: 5px; /* Optional: rounded corners */
|
21 |
+
padding: 10px; /* Optional: padding inside the text area */
|
22 |
+
}
|
23 |
+
</style>
|
24 |
+
""",
|
25 |
+
unsafe_allow_html=True
|
26 |
+
)
|
27 |
|
28 |
# Function to load the pre-trained model with caching
|
29 |
@st.cache_resource
|
|
|
46 |
# Add a subheader for "Source Text"
|
47 |
st.subheader("Source Text")
|
48 |
|
49 |
+
# Text area for user input with height set to 200 and visible border
|
50 |
user_input = st.text_area("", "", height=200, max_chars=200) # no label text, to match the image
|
51 |
|
52 |
# Button for submitting the input
|