Update app.py
Browse files
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 |
-
|
| 24 |
-
feedback = '¡Correcto! Tu puntuación es: ' + str(score)
|
| 25 |
else:
|
| 26 |
-
|
| 27 |
-
|
|
|
|
| 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()
|