research14 commited on
Commit
1f72636
·
1 Parent(s): 13434a8
Files changed (1) hide show
  1. app.py +5 -8
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 and JavaScript to display input above output
7
  custom_interface = """
8
  <div style="text-align: center;">
9
- <label for="input-text">Input Text:</label><br>
10
- <input type="text" id="input-text" name="input_text" value="Enter text here..." style="width: 80%;"><br>
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("input-text").addEventListener("input", function() {
17
- document.getElementById("output-text").value = this.value;
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
  """