Spaces:
Running
Running
Commit
Β·
b5628ea
1
Parent(s):
8558676
update
Browse files- app.py +1 -1
- src/display/formatting.py +5 -3
app.py
CHANGED
@@ -251,4 +251,4 @@ if not LOCAL_MODE:
|
|
251 |
scheduler.start()
|
252 |
|
253 |
# Launch the app
|
254 |
-
demo.queue(default_concurrency_limit=40).launch()
|
|
|
251 |
scheduler.start()
|
252 |
|
253 |
# Launch the app
|
254 |
+
demo.queue(default_concurrency_limit=40).launch(show_error=True)
|
src/display/formatting.py
CHANGED
@@ -17,18 +17,20 @@ def make_clickable_report(report_url):
|
|
17 |
|
18 |
If the report_url is a full URL (starts with http), use it directly
|
19 |
Otherwise, assume it's a local file path and construct a local link
|
|
|
20 |
"""
|
21 |
if not report_url:
|
22 |
return ""
|
23 |
|
24 |
# Check if this is a URL or local file reference
|
25 |
if report_url.startswith("http"):
|
26 |
-
# External URL, use
|
27 |
-
return f
|
28 |
else:
|
29 |
# Local file reference, create a relative path to the public directory
|
|
|
30 |
report_path = f"file/reports/{report_url}"
|
31 |
-
return f
|
32 |
|
33 |
|
34 |
def styled_error(error):
|
|
|
17 |
|
18 |
If the report_url is a full URL (starts with http), use it directly
|
19 |
Otherwise, assume it's a local file path and construct a local link
|
20 |
+
using Gradio's markdown format that works in table cells.
|
21 |
"""
|
22 |
if not report_url:
|
23 |
return ""
|
24 |
|
25 |
# Check if this is a URL or local file reference
|
26 |
if report_url.startswith("http"):
|
27 |
+
# External URL, use markdown format
|
28 |
+
return f"[π View Report]({report_url})"
|
29 |
else:
|
30 |
# Local file reference, create a relative path to the public directory
|
31 |
+
# Use Gradio's file URL format which renders correctly in markdown cells
|
32 |
report_path = f"file/reports/{report_url}"
|
33 |
+
return f"[π Report]({report_path})"
|
34 |
|
35 |
|
36 |
def styled_error(error):
|