Astridkraft commited on
Commit
c4901e6
·
verified ·
1 Parent(s): 84eb5ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -355,7 +355,6 @@ def main_ui():
355
  with gr.Blocks(
356
  title="AI Image Generator",
357
  theme=gr.themes.Base(),
358
- head='<meta name="viewport" content="width=device-width, initial-scale=1.0">',
359
  css="""
360
  .info-box {
361
  background-color: #f8f4f0;
@@ -892,6 +891,7 @@ def main_ui():
892
 
893
  # === START-BUTTON HANDLER ===
894
  info_components = [child for child in demo.children if child != content_area]
 
895
 
896
  start_btn.click(
897
  fn=lambda: gr.update(visible=True),
@@ -901,6 +901,12 @@ def main_ui():
901
  fn=lambda: [gr.update(visible=False) for _ in info_components],
902
  inputs=None,
903
  outputs=info_components
 
 
 
 
 
 
904
  )
905
 
906
  return demo
 
355
  with gr.Blocks(
356
  title="AI Image Generator",
357
  theme=gr.themes.Base(),
 
358
  css="""
359
  .info-box {
360
  background-color: #f8f4f0;
 
891
 
892
  # === START-BUTTON HANDLER ===
893
  info_components = [child for child in demo.children if child != content_area]
894
+
895
 
896
  start_btn.click(
897
  fn=lambda: gr.update(visible=True),
 
901
  fn=lambda: [gr.update(visible=False) for _ in info_components],
902
  inputs=None,
903
  outputs=info_components
904
+ ).then(
905
+ # Scroll zur Seite oben
906
+ fn=None,
907
+ inputs=None,
908
+ outputs=None,
909
+ js="() => window.scrollTo(0, 0)"
910
  )
911
 
912
  return demo