Daemontatox commited on
Commit
8c74e22
·
verified ·
1 Parent(s): c9b80e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -20
app.py CHANGED
@@ -268,27 +268,7 @@ def main():
268
  )
269
 
270
  # Add JavaScript for Enter key handling
271
- demo.load(
272
- None,
273
- None,
274
- None,
275
- _js="""
276
- function enableEnterSubmit() {
277
- const textarea = document.querySelector('#message_input textarea');
278
- const submitBtn = document.querySelector('#submit_btn');
279
-
280
- textarea?.addEventListener('keydown', (e) => {
281
- if (e.key === 'Enter' && !e.shiftKey) {
282
- e.preventDefault();
283
- submitBtn.click();
284
- }
285
- });
286
- }
287
- enableEnterSubmit();
288
- """
289
- )
290
 
291
- return demo
292
 
293
  if __name__ == "__main__":
294
  demo = main()
 
268
  )
269
 
270
  # Add JavaScript for Enter key handling
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
 
 
272
 
273
  if __name__ == "__main__":
274
  demo = main()