av4874 commited on
Commit
9d40b40
·
1 Parent(s): 9dd58c8

Fix Gradio 6.0: move theme param from Blocks() to launch()

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -53,7 +53,7 @@ EXAMPLES = [
53
  ["The invoice for March is attached. Please approve by end of week."],
54
  ]
55
 
56
- with gr.Blocks(title="Prompt Injection Detector", theme=gr.themes.Soft()) as demo:
57
  gr.Markdown(
58
  """
59
  # 🛡️ Prompt Injection Detector
@@ -95,4 +95,4 @@ with gr.Blocks(title="Prompt Injection Detector", theme=gr.themes.Soft()) as dem
95
  btn.click(fn=detect, inputs=inp, outputs=[label_out, sev_out])
96
  inp.submit(fn=detect, inputs=inp, outputs=[label_out, sev_out])
97
 
98
- demo.launch()
 
53
  ["The invoice for March is attached. Please approve by end of week."],
54
  ]
55
 
56
+ with gr.Blocks(title="Prompt Injection Detector") as demo:
57
  gr.Markdown(
58
  """
59
  # 🛡️ Prompt Injection Detector
 
95
  btn.click(fn=detect, inputs=inp, outputs=[label_out, sev_out])
96
  inp.submit(fn=detect, inputs=inp, outputs=[label_out, sev_out])
97
 
98
+ demo.launch(theme=gr.themes.Soft())