datasaur-dev commited on
Commit
017e4bb
·
verified ·
1 Parent(s): f036dba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -86,8 +86,12 @@ def handle_magic_click(current_text):
86
  gr.update(visible=False)
87
  )
88
  else:
89
- # Brackets found - keep normal behavior
90
- return improved_text, current_text, gr.update(visible=True)
 
 
 
 
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: