Merlintxu commited on
Commit
4d76783
·
1 Parent(s): 5f43e64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -16,15 +16,13 @@ def game_logic(sentence, user_input):
16
  return False
17
 
18
  def main(sentence, user_input):
19
- score = 0
20
- feedback = ''
21
  if sentence and user_input:
22
  if game_logic(sentence, user_input):
23
- score += 1
24
- feedback = '¡Correcto! Tu puntuación es: ' + str(score)
25
  else:
26
- feedback = 'Incorrecto. Intenta de nuevo.'
27
- return feedback
 
28
 
29
  iface = gr.Interface(fn=main, inputs=["text", "text"], outputs="text")
30
  iface.launch()
 
16
  return False
17
 
18
  def main(sentence, user_input):
 
 
19
  if sentence and user_input:
20
  if game_logic(sentence, user_input):
21
+ return '¡Correcto!'
 
22
  else:
23
+ return 'Incorrecto. Intenta de nuevo.'
24
+ else:
25
+ return 'Por favor, introduce una frase y una palabra que creas que es un sustantivo, verbo, adjetivo o artículo.'
26
 
27
  iface = gr.Interface(fn=main, inputs=["text", "text"], outputs="text")
28
  iface.launch()