TextConverter / app.py
Kashaf23's picture
Create app.py
1dee234 verified
Raw
History Blame Contribute Delete
569 Bytes
import gradio as gr
# Function to convert text
def convert_text(text):
upper = text.upper()
lower = text.lower()
return upper, lower
# Gradio Interface
demo = gr.Interface(
fn=convert_text,
inputs=gr.Textbox(lines=3, placeholder="Enter your text here..."),
outputs=[
gr.Textbox(label="UPPERCASE TEXT"),
gr.Textbox(label="lowercase text")
],
title="🔤 Text Case Converter",
description="Enter any text and convert it to UPPERCASE and lowercase instantly."
)
# Run app
if __name__ == "__main__":
demo.launch()