Spaces:
Runtime error
Runtime error
File size: 738 Bytes
e8e247e 081b46f a845f21 6f1af31 d901169 ec7540b 75ef19a c6c82c9 771b9c6 b934ee9 182a838 1801662 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import gradio as gr
def echo_text(input_text):
return input_text
# Custom HTML and CSS to display input above output
custom_interface = """
<div style="text-align: center;">
<label for="input-text">Input Text:</label><br>
<input type="text" id="input-text" name="input_text" value="Enter text here..." style="width: 80%;"><br>
<br>
<label for="output-text">Output Text:</label><br>
<textarea id="output-text" name="output_text" rows="5" cols="40" readonly style="width: 80%;"></textarea>
</div>
"""
iface = gr.Interface(
fn=echo_text,
inputs=gr.HTML(custom_interface), # Use custom HTML interface
outputs=gr.Textbox("Output will be displayed here.", type="output"),
live=True
)
iface.launch()
|