Update app.py
Browse files
app.py
CHANGED
@@ -121,17 +121,15 @@ with gr.Blocks(css=custom_css) as interface:
|
|
121 |
summary_output = gr.Textbox(label="Summary", lines=6, text_align="right")
|
122 |
|
123 |
summarize_button.click(summarize, inputs=[text_input, max_length, min_length], outputs=summary_output)
|
124 |
-
|
125 |
-
|
126 |
-
# Update interface labels
|
127 |
def update_labels():
|
128 |
labels = update_interface()
|
129 |
-
title
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
summarize_button
|
134 |
-
|
135 |
|
136 |
if __name__ == "__main__":
|
137 |
interface.launch()
|
|
|
121 |
summary_output = gr.Textbox(label="Summary", lines=6, text_align="right")
|
122 |
|
123 |
summarize_button.click(summarize, inputs=[text_input, max_length, min_length], outputs=summary_output)
|
124 |
+
|
|
|
|
|
125 |
def update_labels():
|
126 |
labels = update_interface()
|
127 |
+
return labels["title"], labels["textbox_label"], labels["max_length_label"], labels["min_length_label"], labels["summarize_button_label"], labels["summary_label"]
|
128 |
+
|
129 |
+
language_button.click(
|
130 |
+
lambda: (toggle_language(), update_labels()),
|
131 |
+
outputs=[title, text_input, max_length, min_length, summarize_button, summary_output]
|
132 |
+
)
|
133 |
|
134 |
if __name__ == "__main__":
|
135 |
interface.launch()
|