Test / app.py
Adityadn's picture
Update app.py
c27ae43 verified
raw
history blame
1.17 kB
print("Wait..")
import gradio as gr
lopek = ["I Love You", "Ilopyu", "I <3 U", "Ai lof yu", "Lop yu"]
sangean = ["Ah", "Ahh"]
gajelas = ["`", "~", "!", "@", "#", "$", "%", "^", "&", "*", "(", "0", "-", "_", "=", "+", "[", "{", "]", "}", ";", ':', "'", ",", "<", ".", ">", "/", "?"]
def analyze_text(text):
# Lakukan analisis atau pemrosesan teks di sini
if text == "":
result = "MASUKKIN THE TEXT IDIOT"
elif text != "":
if text != lopek:
result = f"You memasukkan text: {text}"
elif text != sangean:
result = f"You memasukkan text: {text}"
elif text != gajelas:
result = f"You memasukkan text: {text}"
elif text == lopek:
result = "Love you too...."
elif text == sangean:
result = "You is sangean"
elif text == gajelas:
result = "GAJELAS IDIOT"
else:
result = "What sih!"
else:
result = "This is error nih"
return result
iface = gr.Interface(
fn=analyze_text,
inputs=gr.Textbox(), # Menggunakan input textbox
outputs="text" # Menetapkan output ke tipe teks
)
iface.launch()