barflyman's picture
Update app.py
c3983c2 verified
raw
history blame contribute delete
453 Bytes
import gradio as gr
def is_palindrome(word):
word = word.lower().replace(" ", "")
return "Ja, ist ein Palindrom!" if word == word[::-1] else "Nein, ist kein Palindrom."
iface = gr.Interface(
fn=is_palindrome,
inputs=gr.Textbox(label="Geben Sie ein Wort ein"),
outputs=gr.Textbox(label="Ergebnis"),
title="Palindrom-Checker",
description="Geben Sie ein Wort ein, um zu prüfen, ob es ein Palindrom ist."
)
iface .launch()