kazalbrur commited on
Commit
edebf03
1 Parent(s): a09a909
Files changed (1) hide show
  1. app.py +16 -6
app.py CHANGED
@@ -6,14 +6,24 @@ import torch
6
 
7
  # Set the page configuration
8
  st.set_page_config(
9
- page_title="NMT", # Updated title as seen in the image
10
- page_icon=":robot_face:", # Use an emoji as the icon, similar to the robot face in the image
11
  initial_sidebar_state="auto"
12
  )
13
 
14
- # Load custom CSS styling
15
- with open("assets/style.css") as f:
16
- st.markdown("<style>{}</style>".format(f.read()), unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
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