dev-bjoern commited on
Commit
cbf824f
·
verified ·
1 Parent(s): f737c14

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,11 +1,11 @@
1
  import gradio as gr
 
2
 
3
- # Funktion, die beim Button-Klick ausgeführt wird
4
  def on_button_click():
5
  return "Button wurde geklickt!"
6
 
7
- # Gradio-Oberfläche
8
- with gr.Blocks() as app:
9
  button = gr.Button("Klick mich")
10
  output = gr.Textbox(label="Ausgabe")
11
 
@@ -15,4 +15,4 @@ with gr.Blocks() as app:
15
  outputs=output
16
  )
17
 
18
- app.launch()
 
1
  import gradio as gr
2
+ import spaces
3
 
4
+ @spaces.GPU # Nutzt ZeroGPU, wenn aktiviert
5
  def on_button_click():
6
  return "Button wurde geklickt!"
7
 
8
+ with gr.Blocks() as demo:
 
9
  button = gr.Button("Klick mich")
10
  output = gr.Textbox(label="Ausgabe")
11
 
 
15
  outputs=output
16
  )
17
 
18
+ demo.launch() # Kein share=True