|
print("Wait..") |
|
|
|
import gradio as gr |
|
|
|
lopek = ["I Love You", "Ilopyu", "I <3 U", "Ai lof yu", "Lop yu"] |
|
|
|
def analyze_text(text): |
|
|
|
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": |
|
result = "Love you too...." |
|
elif text == "Ah": |
|
result = "Kamu sangean" |
|
else: |
|
result = f"Anda memasukkan teks: {text}" |
|
else: |
|
result = "Ada yang error nih" |
|
return result |
|
|
|
iface = gr.Interface( |
|
fn=analyze_text, |
|
inputs=gr.Textbox(), |
|
outputs="text" |
|
) |
|
|
|
iface.launch() |