Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,10 @@ import gradio as gr
|
|
2 |
js = """
|
3 |
function redirect()
|
4 |
{
|
5 |
-
|
|
|
|
|
|
|
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:
|