Spaces:
Sleeping
Sleeping
NikhilJoson
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -52,6 +52,11 @@ def Clear(prev_size, photo=celeb_list[1], folder=celeb_folder, next=False):
|
|
52 |
MARKDOWN = "Guess the Cartoon Character before the Image becomes fully clear"
|
53 |
with gr.Blocks(theme=gr.themes.Ocean()) as demo:
|
54 |
gr.Markdown(MARKDOWN)
|
|
|
|
|
|
|
|
|
|
|
55 |
with gr.Row():
|
56 |
with gr.Column(scale=1):
|
57 |
pixelated_image = gr.Image(type='pil', image_mode='RGB', label='Pixelated Image')
|
@@ -60,8 +65,8 @@ with gr.Blocks(theme=gr.themes.Ocean()) as demo:
|
|
60 |
|
61 |
Clear_button = gr.Button(value='Clear', variant='primary')
|
62 |
Next_button = gr.Button(value='Next', variant='secondary')
|
63 |
-
|
64 |
-
Clear_button.click(fn=Clear, inputs=[
|
65 |
-
Next_button.click(fn=Clear, inputs=[
|
66 |
|
67 |
demo.launch(debug=False, show_error=True)
|
|
|
52 |
MARKDOWN = "Guess the Cartoon Character before the Image becomes fully clear"
|
53 |
with gr.Blocks(theme=gr.themes.Ocean()) as demo:
|
54 |
gr.Markdown(MARKDOWN)
|
55 |
+
|
56 |
+
Old_size = curr_size
|
57 |
+
Actual_Answer = answer
|
58 |
+
if_next=True
|
59 |
+
|
60 |
with gr.Row():
|
61 |
with gr.Column(scale=1):
|
62 |
pixelated_image = gr.Image(type='pil', image_mode='RGB', label='Pixelated Image')
|
|
|
65 |
|
66 |
Clear_button = gr.Button(value='Clear', variant='primary')
|
67 |
Next_button = gr.Button(value='Next', variant='secondary')
|
68 |
+
|
69 |
+
Clear_button.click(fn=Clear, inputs=[Old_size], outputs=[pixelated_image, answer, curr_size])
|
70 |
+
Next_button.click(fn=Clear, inputs=[Old_size, Actual_Answer, if_next], outputs=[pixelated_image, answer, prev_size])
|
71 |
|
72 |
demo.launch(debug=False, show_error=True)
|