File size: 950 Bytes
4691065
 
73f03fe
 
7f60d42
82d6904
4691065
 
73f03fe
c6ba141
1f608b2
f68306f
 
 
 
73f03fe
f68306f
af4cf72
f68306f
4691065
 
 
 
62a823b
ba148a8
4691065
 
63cbb11
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
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
    text.lower()
    if text == "":
        result = "MASUKKIN THE TEXT IDIOT"
    elif text in lopek:
        result = "Love you too...."
    elif text in sangean:
        result = "You is sangean"
    elif text == gajelas:
        result = "GAJELAS IDIOT"
    else:
        result = f"You memasukkan text: {text}"
    return result

iface = gr.Interface(
    fn=analyze_text,
    inputs=gr.Textbox(label="Input", placeholder="Enter Text Here", show_copy_button=True),  # Menggunakan input textbox
    outputs=gr.Textbox(type="text", label="Output", show_copy_button=True)
)

iface.launch(show_api=False)