Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -321,6 +321,13 @@ def md_dialogue_to_visual_lines(md_text: str, width: int) -> list[str]:
|
|
| 321 |
if out and out[-1] == "": out.pop()
|
| 322 |
return out
|
| 323 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 324 |
def render_dialogue(md_path: str,
|
| 325 |
width_chars: int = 100,
|
| 326 |
height_px: int = 520,
|
|
@@ -586,7 +593,7 @@ def show_field(f: Field, index: int, data_collected):
|
|
| 586 |
)
|
| 587 |
|
| 588 |
elif f.name == 'role_name' and value:
|
| 589 |
-
|
| 590 |
#,
|
| 591 |
#width_chars=115, height_px=520, show_border=False
|
| 592 |
#)
|
|
|
|
| 321 |
if out and out[-1] == "": out.pop()
|
| 322 |
return out
|
| 323 |
|
| 324 |
+
def render_markdown_simple(md_path, height_px=520):
|
| 325 |
+
md = read_md(md_path)
|
| 326 |
+
st.markdown(
|
| 327 |
+
f"<div style='max-height:{height_px}px; overflow:auto'>{markdown(md, extensions=['extra','codehilite'])}</div>",
|
| 328 |
+
unsafe_allow_html=True
|
| 329 |
+
)
|
| 330 |
+
|
| 331 |
def render_dialogue(md_path: str,
|
| 332 |
width_chars: int = 100,
|
| 333 |
height_px: int = 520,
|
|
|
|
| 593 |
)
|
| 594 |
|
| 595 |
elif f.name == 'role_name' and value:
|
| 596 |
+
render_markdown_simple(os.path.join(input_repo_path, 'role_descriptions', value), height_px=520)
|
| 597 |
#,
|
| 598 |
#width_chars=115, height_px=520, show_border=False
|
| 599 |
#)
|