Spaces:
Sleeping
Sleeping
Moezulhaq24
commited on
Commit
β’
3cf1003
1
Parent(s):
cafeb76
Update app.py
Browse files
app.py
CHANGED
@@ -30,11 +30,19 @@ st.markdown(
|
|
30 |
border-radius: 8px;
|
31 |
text-align: center;
|
32 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
</style>
|
34 |
""",
|
35 |
unsafe_allow_html=True
|
36 |
)
|
37 |
|
|
|
38 |
|
39 |
col1, col2, col3 = st.columns([1, 3, 1])
|
40 |
|
@@ -59,7 +67,9 @@ with col2:
|
|
59 |
translation = translator(text, max_length=400)[0]['translation_text']
|
60 |
|
61 |
# Display translation
|
62 |
-
st.
|
63 |
-
|
|
|
|
|
64 |
else:
|
65 |
st.write("Please enter some text to translate.")
|
|
|
30 |
border-radius: 8px;
|
31 |
text-align: center;
|
32 |
}
|
33 |
+
.output-box {
|
34 |
+
background-color: #ffffff;
|
35 |
+
border: 1px solid #ccc;
|
36 |
+
border-radius: 8px;
|
37 |
+
padding: 1rem;
|
38 |
+
margin-top: 1rem;
|
39 |
+
}
|
40 |
</style>
|
41 |
""",
|
42 |
unsafe_allow_html=True
|
43 |
)
|
44 |
|
45 |
+
st.markdown('<h1 class="title">π TRANSLINGO π‘</h1>', unsafe_allow_html=True)
|
46 |
|
47 |
col1, col2, col3 = st.columns([1, 3, 1])
|
48 |
|
|
|
67 |
translation = translator(text, max_length=400)[0]['translation_text']
|
68 |
|
69 |
# Display translation
|
70 |
+
st.markdown(
|
71 |
+
f'<div class="output-box"><h3>Translation in {selected_language}:</h3><p>{translation}</p></div>',
|
72 |
+
unsafe_allow_html=True
|
73 |
+
)
|
74 |
else:
|
75 |
st.write("Please enter some text to translate.")
|