fcakyon commited on
Commit
f14b62f
·
verified ·
1 Parent(s): 331e0bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -26,7 +26,7 @@ CSS = """
26
  }
27
  """
28
 
29
- with gr.Blocks(title="Visual Content Moderation", css=CSS) as demo:
30
  gr.HTML("""
31
  <div class="header">
32
  <h1>Viddexa - Visual Content Moderation</h1>
@@ -75,12 +75,14 @@ with gr.Blocks(title="Visual Content Moderation", css=CSS) as demo:
75
  with gr.Column(scale=1):
76
  output = gr.Label(label="Classification Scores", num_top_classes=10)
77
 
 
78
  gr.Examples(
79
- examples=[[None, url, model] for url, model in EXAMPLE_ITEMS],
80
- inputs=[image_input, url_input, model_choice],
81
  outputs=output,
82
- fn=lambda img, url, model: analyze(img, url, model, TOKEN),
83
  cache_examples=False,
 
84
  )
85
 
86
  analyze_btn.click(
 
26
  }
27
  """
28
 
29
+ with gr.Blocks(title="Visual Content Moderation", css=CSS, theme=gr.themes.Default(primary_hue=gr.themes.colors.teal)) as demo:
30
  gr.HTML("""
31
  <div class="header">
32
  <h1>Viddexa - Visual Content Moderation</h1>
 
75
  with gr.Column(scale=1):
76
  output = gr.Label(label="Classification Scores", num_top_classes=10)
77
 
78
+ gr.Markdown("### 🎯 Try an Example")
79
  gr.Examples(
80
+ examples=[[url, model] for url, model in EXAMPLE_ITEMS],
81
+ inputs=[url_input, model_choice],
82
  outputs=output,
83
+ fn=lambda url, model: analyze(None, url, model, TOKEN),
84
  cache_examples=False,
85
+ run_on_click=True,
86
  )
87
 
88
  analyze_btn.click(