Spaces:
Runtime error
Runtime error
mcmillanmajora
commited on
Commit
•
c98bb79
1
Parent(s):
d71f3be
Update app.py
Browse filesForgot import statement and updated render_page function
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
import re
|
3 |
from pathlib import Path
|
|
|
4 |
|
5 |
import yaml
|
6 |
|
@@ -21,10 +22,8 @@ def render_preview(image, title, description):
|
|
21 |
|
22 |
|
23 |
def render_page(post_path: Path):
|
24 |
-
|
25 |
-
|
26 |
-
page_content = match.group(2) if match else text
|
27 |
-
st.markdown(page_content, unsafe_allow_html=True)
|
28 |
|
29 |
|
30 |
def get_page_data(post_path: Path):
|
|
|
1 |
import streamlit as st
|
2 |
import re
|
3 |
from pathlib import Path
|
4 |
+
import importlib
|
5 |
|
6 |
import yaml
|
7 |
|
|
|
22 |
|
23 |
|
24 |
def render_page(post_path: Path):
|
25 |
+
mod = importlib.import_module(str(post_path))
|
26 |
+
mod.run_article()
|
|
|
|
|
27 |
|
28 |
|
29 |
def get_page_data(post_path: Path):
|