Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ from huggingface_hub import InferenceClient
|
|
| 24 |
if not os.path.exists("MarkdownCode.md"):
|
| 25 |
with open("MarkdownCode.md", 'w', encoding='utf-8') as f:
|
| 26 |
f.write("# Default Markdown\nThis is a default Markdown file.")
|
| 27 |
-
st.
|
| 28 |
|
| 29 |
if not os.path.exists("MermaidCode.md"):
|
| 30 |
with open("MermaidCode.md", 'w', encoding='utf-8') as f:
|
|
@@ -36,7 +36,7 @@ if not os.path.exists("MermaidCode.md"):
|
|
| 36 |
click A "/?q=Default" "Open Default" "_self"
|
| 37 |
click B "/?q=Example" "Open Example" "_self"
|
| 38 |
""")
|
| 39 |
-
st.
|
| 40 |
|
| 41 |
# ----------------------------
|
| 42 |
# Placeholder data structures
|
|
@@ -580,7 +580,7 @@ def main():
|
|
| 580 |
with colB:
|
| 581 |
if st.button("β Clear"):
|
| 582 |
st.session_state["markdown_text"] = ""
|
| 583 |
-
st.
|
| 584 |
with colC:
|
| 585 |
if st.button("πΎ File Save"):
|
| 586 |
with open("MarkdownCode.md", 'w', encoding='utf-8') as f:
|
|
@@ -614,11 +614,11 @@ def main():
|
|
| 614 |
if st.button("π¨ Refresh"):
|
| 615 |
st.session_state["current_mermaid"] = mermaid_input
|
| 616 |
st.write("**Mermaid** diagram refreshed! π")
|
| 617 |
-
st.
|
| 618 |
with colD:
|
| 619 |
if st.button("β Clear "):
|
| 620 |
st.session_state["current_mermaid"] = ""
|
| 621 |
-
st.
|
| 622 |
with colE:
|
| 623 |
if st.button("πΎ File Save "):
|
| 624 |
with open("MermaidCode.md", 'w', encoding='utf-8') as f:
|
|
|
|
| 24 |
if not os.path.exists("MarkdownCode.md"):
|
| 25 |
with open("MarkdownCode.md", 'w', encoding='utf-8') as f:
|
| 26 |
f.write("# Default Markdown\nThis is a default Markdown file.")
|
| 27 |
+
st.rerun()
|
| 28 |
|
| 29 |
if not os.path.exists("MermaidCode.md"):
|
| 30 |
with open("MermaidCode.md", 'w', encoding='utf-8') as f:
|
|
|
|
| 36 |
click A "/?q=Default" "Open Default" "_self"
|
| 37 |
click B "/?q=Example" "Open Example" "_self"
|
| 38 |
""")
|
| 39 |
+
st.rerun()
|
| 40 |
|
| 41 |
# ----------------------------
|
| 42 |
# Placeholder data structures
|
|
|
|
| 580 |
with colB:
|
| 581 |
if st.button("β Clear"):
|
| 582 |
st.session_state["markdown_text"] = ""
|
| 583 |
+
st.rerun()
|
| 584 |
with colC:
|
| 585 |
if st.button("πΎ File Save"):
|
| 586 |
with open("MarkdownCode.md", 'w', encoding='utf-8') as f:
|
|
|
|
| 614 |
if st.button("π¨ Refresh"):
|
| 615 |
st.session_state["current_mermaid"] = mermaid_input
|
| 616 |
st.write("**Mermaid** diagram refreshed! π")
|
| 617 |
+
st.rerun()
|
| 618 |
with colD:
|
| 619 |
if st.button("β Clear "):
|
| 620 |
st.session_state["current_mermaid"] = ""
|
| 621 |
+
st.rerun()
|
| 622 |
with colE:
|
| 623 |
if st.button("πΎ File Save "):
|
| 624 |
with open("MermaidCode.md", 'w', encoding='utf-8') as f:
|