File size: 874 Bytes
4691065 e7c02df 82d6904 4691065 c6ba141 1d715b2 4efcd2a 8be0756 4efcd2a af4cf72 3c91c82 4691065 |
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 26 27 28 29 30 |
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 != "":
if text != "I Love You" or "Ilopyu" or "I <3 U" or "Ai lof yu" or "Lop yu" or "ah":
result = f"You memasukkan teks: {text}"
elif text == "I Love You" or "Ilopyu" or "I <3 U" or "Ai lof yu" or "Lop yu":
result = "Love you too...."
elif text == "Ah":
result = "Kamu sangean"
else:
result = "Apa sih!"
else:
result = "Ada yang 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() |