Spaces:
Runtime error
Runtime error
prabinpanta0
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -60,11 +60,10 @@ def generate(text):
|
|
60 |
return str(e)
|
61 |
|
62 |
# Custom HTML and JavaScript for "Copy to Clipboard" functionality
|
63 |
-
|
64 |
-
|
65 |
-
<textarea id="output-textbox" rows="6" style="width: 100%;"></textarea>
|
66 |
<button onclick="copyToClipboard()">Copy to Clipboard</button>
|
67 |
-
|
68 |
<script>
|
69 |
function copyToClipboard() {
|
70 |
var copyText = document.getElementById("output-textbox");
|
@@ -77,7 +76,8 @@ custom_html = """
|
|
77 |
iface = gr.Interface(
|
78 |
fn=generate,
|
79 |
inputs=gr.Textbox(lines=2, placeholder="Enter text here..."),
|
80 |
-
outputs="
|
|
|
81 |
title="Chuunibyou Text Generator",
|
82 |
description="Transform text into an elaborate and formal style with a nobleman tone.",
|
83 |
live=False
|
|
|
60 |
return str(e)
|
61 |
|
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");
|
|
|
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
|