text-reverser / app.py
Sujatha's picture
Create app.py
b115231 verified
raw
history blame contribute delete
405 Bytes
import gradio as gr
# Function to reverse the input text
def reverse_text(text):
return text[::-1]
# Gradio interface
interface = gr.Interface(
fn=reverse_text, # Function to call
inputs="text", # Input type
outputs="text", # Output type
title="Text Reverser",
description="Enter some text, and the app will reverse it for you!"
)
# Launch the interface
interface.launch()