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 TEKS GOBLOK" | |
elif text == lopek: | |
result = "Love you too...." | |
else: | |
result = f"Anda memasukkan teks: {text}" | |
return result | |
iface = gr.Interface( | |
fn=analyze_text, | |
inputs=gr.Textbox(), # Menggunakan input textbox | |
outputs="text" # Menetapkan output ke tipe teks | |
) | |
iface.launch() |