Adityadn commited on
Commit
f68306f
·
verified ·
1 Parent(s): c27ae43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -19
app.py CHANGED
@@ -1,5 +1,3 @@
1
- print("Wait..")
2
-
3
  import gradio as gr
4
 
5
  lopek = ["I Love You", "Ilopyu", "I <3 U", "Ai lof yu", "Lop yu"]
@@ -10,23 +8,14 @@ def analyze_text(text):
10
  # Lakukan analisis atau pemrosesan teks di sini
11
  if text == "":
12
  result = "MASUKKIN THE TEXT IDIOT"
13
- elif text != "":
14
- if text != lopek:
15
- result = f"You memasukkan text: {text}"
16
- elif text != sangean:
17
- result = f"You memasukkan text: {text}"
18
- elif text != gajelas:
19
- result = f"You memasukkan text: {text}"
20
- elif text == lopek:
21
- result = "Love you too...."
22
- elif text == sangean:
23
- result = "You is sangean"
24
- elif text == gajelas:
25
- result = "GAJELAS IDIOT"
26
- else:
27
- result = "What sih!"
28
  else:
29
- result = "This is error nih"
30
  return result
31
 
32
  iface = gr.Interface(
@@ -35,4 +24,4 @@ iface = gr.Interface(
35
  outputs="text" # Menetapkan output ke tipe teks
36
  )
37
 
38
- iface.launch()
 
 
 
1
  import gradio as gr
2
 
3
  lopek = ["I Love You", "Ilopyu", "I <3 U", "Ai lof yu", "Lop yu"]
 
8
  # Lakukan analisis atau pemrosesan teks di sini
9
  if text == "":
10
  result = "MASUKKIN THE TEXT IDIOT"
11
+ elif text in lopek:
12
+ result = "Love you too...."
13
+ elif text in sangean:
14
+ result = "You is sangean"
15
+ elif text in gajelas:
16
+ result = "GAJELAS IDIOT"
 
 
 
 
 
 
 
 
 
17
  else:
18
+ result = f"You memasukkan text: {text}"
19
  return result
20
 
21
  iface = gr.Interface(
 
24
  outputs="text" # Menetapkan output ke tipe teks
25
  )
26
 
27
+ iface.launch()