rot_13 / app.py
Blane187's picture
Update app.py
3f2966e verified
raw
history blame contribute delete
556 Bytes
import gradio as gr
import codecs
def rot13_cipher(text):
# Encode the text using ROT13
rot13_encoded = codecs.encode(text, 'rot_13')
# Decode the text using ROT13
rot13_decoded = codecs.decode(rot13_encoded, 'rot_13')
return rot13_encoded
# Gradio interface
iface = gr.Interface(
fn=rot13_cipher,
theme="Hev832/Applio",
inputs="text",
outputs=["text"],
title="ROT13 Encoder/Decoder",
description="Enter text to see its ROT13 encoded and decoded versions."
)
# Launch the interface
iface.launch()