Commit
•
6241c2b
1
Parent(s):
f66df0b
Add back JS
Browse files
app.py
CHANGED
@@ -18,13 +18,13 @@ login(token = os.environ['HUB_TOKEN'])
|
|
18 |
# logger.setup([gr.Text(label="clicked_url"), gr.Text(label="seach_term"), gr.Text(label = 'sessionhash'), gr.Text(label = 'datetime')], './flagged_data_points')
|
19 |
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
dataset = load_dataset("bradley6597/illustration-test", data_files = 'data.csv')
|
30 |
df = pd.DataFrame(dataset['train']).drop_duplicates()
|
@@ -269,8 +269,8 @@ td img{
|
|
269 |
}
|
270 |
'''
|
271 |
|
272 |
-
with gr.Blocks(css=style
|
273 |
-
|
274 |
) as app:
|
275 |
with gr.Row():
|
276 |
with gr.Column(min_width = 10):
|
|
|
18 |
# logger.setup([gr.Text(label="clicked_url"), gr.Text(label="seach_term"), gr.Text(label = 'sessionhash'), gr.Text(label = 'datetime')], './flagged_data_points')
|
19 |
|
20 |
|
21 |
+
logging_js = '''
|
22 |
+
function magicFunc(x){
|
23 |
+
let script = document.createElement('script');
|
24 |
+
script.src = "file/js_functions.js"
|
25 |
+
document.head.appendChild(script);
|
26 |
+
}
|
27 |
+
'''
|
28 |
|
29 |
dataset = load_dataset("bradley6597/illustration-test", data_files = 'data.csv')
|
30 |
df = pd.DataFrame(dataset['train']).drop_duplicates()
|
|
|
269 |
}
|
270 |
'''
|
271 |
|
272 |
+
with gr.Blocks(css=style,
|
273 |
+
js = logging_js
|
274 |
) as app:
|
275 |
with gr.Row():
|
276 |
with gr.Column(min_width = 10):
|