aliabd HF staff commited on
Commit
92119f4
1 Parent(s): 8f4deb6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -2,7 +2,10 @@ import gradio as gr
2
  js = """
3
  function redirect()
4
  {
5
- window.location.href = 'https://fb59f01c.gradio-website.pages.dev/playground';
 
 
 
6
  }
7
  """
8
  with gr.Blocks(js=js) as demo:
 
2
  js = """
3
  function redirect()
4
  {
5
+ const current_path = window.location.pathname;
6
+ const cloudflare_preview = 'https://41e124ab.gradio-website.pages.dev';
7
+ const url = current_path + cloudflare_preview
8
+ window.location.href = url;
9
  }
10
  """
11
  with gr.Blocks(js=js) as demo: