1st_space / app.py
Almahfouz's picture
Create app.py
186e5a8 verified
raw
history blame contribute delete
456 Bytes
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()