Spaces:
Running
Running
inoki-giskard
commited on
Commit
•
3833563
1
Parent(s):
fd65063
Escape job information in HTML
Browse files- app_debug.py +3 -2
app_debug.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
from os import listdir
|
2 |
from os.path import isfile, join
|
|
|
3 |
|
4 |
import gradio as gr
|
5 |
|
@@ -46,11 +47,11 @@ def get_config_files():
|
|
46 |
return config_files
|
47 |
|
48 |
def get_jobs_info_in_queue():
|
49 |
-
return [f"⌛️job id {job[0]}: {job[2]}<br/>" for job in pipe.jobs]
|
50 |
|
51 |
def get_queue_status():
|
52 |
if len(pipe.jobs) > 0 or pipe.current is not None:
|
53 |
-
return f'<div style="padding-top: 5%">Current job: {pipe.current} <br/> Jobs in queue: <br/> {"".join(get_jobs_info_in_queue())}</div>'
|
54 |
else:
|
55 |
return '<div style="padding-top: 5%">No jobs in queue, please submit an evaluation task from another tab.</div>'
|
56 |
|
|
|
1 |
from os import listdir
|
2 |
from os.path import isfile, join
|
3 |
+
import html
|
4 |
|
5 |
import gradio as gr
|
6 |
|
|
|
47 |
return config_files
|
48 |
|
49 |
def get_jobs_info_in_queue():
|
50 |
+
return [f"⌛️job id {html.escape(job[0])}: {html.escape(job[2])}<br/>" for job in pipe.jobs]
|
51 |
|
52 |
def get_queue_status():
|
53 |
if len(pipe.jobs) > 0 or pipe.current is not None:
|
54 |
+
return f'<div style="padding-top: 5%">Current job: {html.escape(pipe.current)} <br/> Jobs in queue: <br/> {"".join(get_jobs_info_in_queue())}</div>'
|
55 |
else:
|
56 |
return '<div style="padding-top: 5%">No jobs in queue, please submit an evaluation task from another tab.</div>'
|
57 |
|