JoFrost commited on
Commit
5fcbfe4
β€’
1 Parent(s): 5ce0d36

chore: piwik

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py CHANGED
@@ -7,6 +7,24 @@ import os
7
  USER_ID = str(uuid.uuid4())
8
  SERVER_URL = "https://lavague.mithrilsecurity.io"
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  title = """
11
  <div align="center">
12
  <h1>🌊 Welcome to LaVague</h1>
@@ -82,6 +100,7 @@ def show_processing_message():
82
  return "Processing..."
83
 
84
  def create_demo(base_url, instructions):
 
85
  with gr.Blocks() as demo:
86
  with gr.Tab("LaVague"):
87
  with gr.Row():
@@ -122,6 +141,7 @@ def create_demo(base_url, instructions):
122
  ).then(
123
  update_image_display, inputs=[image_display, url_input], outputs=[image_display, url_input], queue=False
124
  )
 
125
  demo.launch(share=True, debug=True)
126
 
127
  base_url = "https://huggingface.co/"
 
7
  USER_ID = str(uuid.uuid4())
8
  SERVER_URL = "https://lavague.mithrilsecurity.io"
9
 
10
+ piwik_header = '''
11
+ <!-- Google Tag Manager -->
12
+ <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
13
+ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
14
+ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
15
+ 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
16
+ })(window,document,'script','dataLayer','GTM-TVD93MF');</script>
17
+ <!-- End Google Tag Manager -->
18
+ <html lang="en">
19
+ '''
20
+
21
+ piwik_footer = '''
22
+ <!-- Google Tag Manager (noscript) -->
23
+ <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TVD93MF"
24
+ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
25
+ <!-- End Google Tag Manager (noscript) -->
26
+ '''
27
+
28
  title = """
29
  <div align="center">
30
  <h1>🌊 Welcome to LaVague</h1>
 
100
  return "Processing..."
101
 
102
  def create_demo(base_url, instructions):
103
+ gr.HTML(piwik_header)
104
  with gr.Blocks() as demo:
105
  with gr.Tab("LaVague"):
106
  with gr.Row():
 
141
  ).then(
142
  update_image_display, inputs=[image_display, url_input], outputs=[image_display, url_input], queue=False
143
  )
144
+ gr.HTML(piwik_footer)
145
  demo.launch(share=True, debug=True)
146
 
147
  base_url = "https://huggingface.co/"