Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,8 +86,12 @@ def handle_magic_click(current_text):
|
|
| 86 |
gr.update(visible=False)
|
| 87 |
)
|
| 88 |
else:
|
| 89 |
-
# Brackets found -
|
| 90 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
|
| 93 |
with gr.Blocks(css=".success-text { background-color: #d4edda !important; }") as demo:
|
|
|
|
| 86 |
gr.update(visible=False)
|
| 87 |
)
|
| 88 |
else:
|
| 89 |
+
# Brackets found - reset text area to normal appearance and show previous text
|
| 90 |
+
return (
|
| 91 |
+
gr.update(value=improved_text, elem_classes=""),
|
| 92 |
+
current_text,
|
| 93 |
+
gr.update(visible=True)
|
| 94 |
+
)
|
| 95 |
|
| 96 |
|
| 97 |
with gr.Blocks(css=".success-text { background-color: #d4edda !important; }") as demo:
|