suayptalha commited on
Commit
b44067e
·
verified ·
1 Parent(s): f837de5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -6
app.py CHANGED
@@ -43,7 +43,7 @@ def start_game():
43
  eval_buttons_update, # btn_incorrect
44
  "", # final_state
45
  restart_update, # btn_restart
46
- continue_update # btn_continue
47
  )
48
 
49
  def process_turn(user_answer, history):
@@ -95,7 +95,7 @@ def process_turn(user_answer, history):
95
  eval_update, # btn_incorrect
96
  final_answer, # final_state
97
  restart_update, # btn_restart
98
- continue_update # btn_continue
99
  )
100
 
101
  def process_yes(history):
@@ -137,7 +137,7 @@ def evaluate_incorrect(final_state):
137
  gr.update(visible=False), # btn_correct hidden
138
  gr.update(visible=False), # btn_incorrect hidden
139
  gr.update(visible=False), # btn_restart hidden
140
- gr.update(visible=True, value="Continue") # btn_continue visible
141
  )
142
 
143
  def continue_game(history):
@@ -161,10 +161,10 @@ def continue_game(history):
161
  gr.update(visible=True), # btn_no
162
  gr.update(visible=True), # btn_dont_know
163
  gr.update(visible=False), # btn_correct
164
- gr.update(visible=False), # btn_incorrect
165
  "", # final_state
166
- gr.update(visible=False), # btn_restart
167
- gr.update(visible=False) # btn_continue
168
  )
169
 
170
  def restart_game():
@@ -360,4 +360,14 @@ with gr.Blocks(css=css) as demo:
360
  ]
361
  )
362
 
 
 
 
 
 
 
 
 
 
 
363
  demo.launch(debug=True, show_error=True)
 
43
  eval_buttons_update, # btn_incorrect
44
  "", # final_state
45
  restart_update, # btn_restart
46
+ continue_update # btn_continue
47
  )
48
 
49
  def process_turn(user_answer, history):
 
95
  eval_update, # btn_incorrect
96
  final_answer, # final_state
97
  restart_update, # btn_restart
98
+ continue_update # btn_continue
99
  )
100
 
101
  def process_yes(history):
 
137
  gr.update(visible=False), # btn_correct hidden
138
  gr.update(visible=False), # btn_incorrect hidden
139
  gr.update(visible=False), # btn_restart hidden
140
+ gr.update(visible=True, value="Continue") # btn_continue visible
141
  )
142
 
143
  def continue_game(history):
 
161
  gr.update(visible=True), # btn_no
162
  gr.update(visible=True), # btn_dont_know
163
  gr.update(visible=False), # btn_correct
164
+ gr.update(visible=False), # btn_incorrect
165
  "", # final_state
166
+ gr.update(visible=False), # btn_restart
167
+ gr.update(visible=False) # btn_continue
168
  )
169
 
170
  def restart_game():
 
360
  ]
361
  )
362
 
363
+ # Add a fixed icon at the bottom center of the screen using a local file path.
364
+ # Ensure that "icon.png" is in the same directory as this script (or adjust the path accordingly).
365
+ gr.HTML(
366
+ """
367
+ <div style="position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 1000;">
368
+ <img src="tubitech-su.png" alt="Icon" style="width: 50px; height: auto;">
369
+ </div>
370
+ """
371
+ )
372
+
373
  demo.launch(debug=True, show_error=True)