File size: 1,020 Bytes
4691065 e7c02df 7f60d42 82d6904 4691065 c6ba141 1f608b2 1d715b2 7f60d42 1f608b2 8be0756 7f60d42 6326306 4efcd2a 6326306 af4cf72 6326306 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 31 32 33 34 |
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 == lopek:
result = "Love you too...."
elif text == sangean:
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() |