Spaces:
Runtime error
Runtime error
Commit
·
1f72636
1
Parent(s):
13434a8
changes
Browse files
app.py
CHANGED
@@ -3,18 +3,15 @@ import gradio as gr
|
|
3 |
def echo_text(input_text):
|
4 |
return input_text
|
5 |
|
6 |
-
# Custom HTML
|
7 |
custom_interface = """
|
8 |
<div style="text-align: center;">
|
9 |
-
<label for="
|
10 |
-
<
|
11 |
-
<br>
|
12 |
-
<label for="output-text">Output Text:</label><br>
|
13 |
-
<textarea id="output-text" name="output_text" rows="5" cols="40" readonly style="width: 80%;"></textarea>
|
14 |
</div>
|
15 |
<script>
|
16 |
-
document.getElementById("
|
17 |
-
|
18 |
});
|
19 |
</script>
|
20 |
"""
|
|
|
3 |
def echo_text(input_text):
|
4 |
return input_text
|
5 |
|
6 |
+
# Custom HTML layout for input and output
|
7 |
custom_interface = """
|
8 |
<div style="text-align: center;">
|
9 |
+
<label for="io-text">Input Text:</label><br>
|
10 |
+
<textarea id="io-text" name="io_text" rows="5" cols="40" style="width: 80%;"></textarea>
|
|
|
|
|
|
|
11 |
</div>
|
12 |
<script>
|
13 |
+
document.getElementById("io-text").addEventListener("input", function() {
|
14 |
+
this.value = this.value;
|
15 |
});
|
16 |
</script>
|
17 |
"""
|