Test / app.py
Adityadn's picture
Update app.py
1f608b2 verified
raw
history blame
780 Bytes
print("Wait..")
import gradio as gr
lopek = ["I Love You", "Ilopyu", "I <3 U", "Ai lof yu", "Lop yu"]
def analyze_text(text):
# Lakukan analisis atau pemrosesan teks di sini
if text == "":
result = "MASUKKIN THE TEXT IDIOT"
elif text != "":
if text != [f"{lopek}, Ah, Ahh"]:
result = f"You memasukkan text: {text}"
elif text == lopek:
result = "Love you too...."
elif text == ["Ah", "Ahh"]:
result = "You is sangean"
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()