prabinpanta0 commited on
Commit
1c50fd5
·
verified ·
1 Parent(s): aae06df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -62,22 +62,18 @@ def generate(text):
62
  # Custom HTML and JavaScript for "Copy to Clipboard" functionality
63
  js = """
64
 
65
- <button onclick="copyToClipboard()">Copy to Clipboard</button>
66
-
67
- <script>
68
  function copyToClipboard() {
69
  var copyText = document.getElementById("output-textbox");
70
  copyText.select();
71
  document.execCommand("copy");
72
  }
73
- </script>
74
  """
75
 
76
  iface = gr.Interface(
77
  fn=generate,
 
78
  inputs=gr.Textbox(lines=2, placeholder="Enter text here..."),
79
- outputs="text",
80
- gr.button="js"
81
  title="Chuunibyou Text Generator",
82
  description="Transform text into an elaborate and formal style with a nobleman tone.",
83
  live=False
 
62
  # Custom HTML and JavaScript for "Copy to Clipboard" functionality
63
  js = """
64
 
 
 
 
65
  function copyToClipboard() {
66
  var copyText = document.getElementById("output-textbox");
67
  copyText.select();
68
  document.execCommand("copy");
69
  }
 
70
  """
71
 
72
  iface = gr.Interface(
73
  fn=generate,
74
+ js = js,
75
  inputs=gr.Textbox(lines=2, placeholder="Enter text here..."),
76
+ outputs="text" (id="output-textbox"),
 
77
  title="Chuunibyou Text Generator",
78
  description="Transform text into an elaborate and formal style with a nobleman tone.",
79
  live=False