File size: 456 Bytes
186e5a8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr

# Function to reverse the input text
def reverse_text(text):
    return text[::-1]

# Create a Gradio interface
iface = gr.Interface(
    fn=reverse_text,  # Function to use for processing
    inputs="text",    # Input type: text
    outputs="text",   # Output type: text
    title="Text Reverser",  # Title of the interface
    description="Enter text and it will be reversed!"  # Description
)

# Launch the interface
iface.launch()