Update app.py
Browse files
app.py
CHANGED
@@ -7,17 +7,22 @@ gajelas = ["`", "~", "!", "@", "#", "$", "%", "^", "&", "*", "(", "0", "-", "_",
|
|
7 |
def analyze_text(text):
|
8 |
# Lakukan analisis atau pemrosesan teks di sini
|
9 |
text.lower()
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
18 |
else:
|
19 |
-
result =
|
20 |
-
|
21 |
|
22 |
iface = gr.Interface(
|
23 |
fn=analyze_text,
|
|
|
7 |
def analyze_text(text):
|
8 |
# Lakukan analisis atau pemrosesan teks di sini
|
9 |
text.lower()
|
10 |
+
|
11 |
+
if text.lower():
|
12 |
+
if text == "":
|
13 |
+
result = "MASUKKIN THE TEXT IDIOT"
|
14 |
+
elif text in lopek:
|
15 |
+
result = "Love you too...."
|
16 |
+
elif text in sangean:
|
17 |
+
result = "You is sangean"
|
18 |
+
elif text == gajelas: #contoh pengguna memasukkan HALO! maka dijaawab pakai ini:
|
19 |
+
result = "GAJELAS IDIOT"
|
20 |
+
else:
|
21 |
+
result = f"You memasukkan text: {text}"
|
22 |
+
return result
|
23 |
else:
|
24 |
+
result = "ERROR ANJING!"
|
25 |
+
return result
|
26 |
|
27 |
iface = gr.Interface(
|
28 |
fn=analyze_text,
|