Spaces:
Sleeping
Sleeping
smhavens
commited on
Commit
·
a87b166
1
Parent(s):
e22b7aa
UI update for guesses
Browse files
app.py
CHANGED
@@ -111,9 +111,9 @@ def check_answer(guess:str):
|
|
111 |
global answer
|
112 |
guesses.append(guess)
|
113 |
if guess.lower() == answer.lower():
|
114 |
-
return "Correct!"
|
115 |
else:
|
116 |
-
return "Try again!"
|
117 |
|
118 |
def main():
|
119 |
word1 = "Black"
|
@@ -131,9 +131,8 @@ def main():
|
|
131 |
text_output = gr.Textbox()
|
132 |
text_button = gr.Button("Submit")
|
133 |
with gr.Accordion("Open for previous guesses"):
|
134 |
-
|
135 |
-
|
136 |
-
text_button.click(check_answer, inputs=[text_input], outputs=text_output)
|
137 |
# iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
138 |
iface.launch()
|
139 |
|
|
|
111 |
global answer
|
112 |
guesses.append(guess)
|
113 |
if guess.lower() == answer.lower():
|
114 |
+
return "Correct!", guesses
|
115 |
else:
|
116 |
+
return "Try again!", guesses
|
117 |
|
118 |
def main():
|
119 |
word1 = "Black"
|
|
|
131 |
text_output = gr.Textbox()
|
132 |
text_button = gr.Button("Submit")
|
133 |
with gr.Accordion("Open for previous guesses"):
|
134 |
+
text_guesses = gr.Textbox()
|
135 |
+
text_button.click(check_answer, inputs=[text_input], outputs=[text_output, text_guesses])
|
|
|
136 |
# iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
137 |
iface.launch()
|
138 |
|