File size: 579 Bytes
b8d204c 9d0591d b8d204c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
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, rot13_decoded
# Gradio interface
iface = gr.Interface(
fn=rot13_cipher,
theme="Hev832/Applio",
inputs="text",
outputs=["text", "text"],
title="ROT13 Encoder/Decoder",
description="Enter text to see its ROT13 encoded and decoded versions."
)
# Launch the interface
iface.launch()
|