Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -89,12 +89,13 @@ api_key = os.getenv("OPENAI_API_KEY")
|
|
89 |
# Input field for the text
|
90 |
english_text = st.text_area("Enter the English text to translate")
|
91 |
|
|
|
|
|
|
|
|
|
92 |
# Button to trigger the translation
|
93 |
if st.button("Translate"):
|
94 |
if api_key and english_text:
|
95 |
-
# Initialize the progress bar
|
96 |
-
progress_bar = st.progress(0)
|
97 |
-
progress_text = st.empty() # To show the progress text
|
98 |
|
99 |
try:
|
100 |
# Step 1: Request translation
|
|
|
89 |
# Input field for the text
|
90 |
english_text = st.text_area("Enter the English text to translate")
|
91 |
|
92 |
+
# Initialize the progress bar and progress text above the translate button
|
93 |
+
progress_bar = st.progress(0)
|
94 |
+
progress_text = st.empty() # To show the progress text
|
95 |
+
|
96 |
# Button to trigger the translation
|
97 |
if st.button("Translate"):
|
98 |
if api_key and english_text:
|
|
|
|
|
|
|
99 |
|
100 |
try:
|
101 |
# Step 1: Request translation
|