awacke1 commited on
Commit
1e5c668
·
verified ·
1 Parent(s): f19bbef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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.experimental_rerun()
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.experimental_rerun()
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.experimental_rerun()
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.experimental_rerun()
618
  with colD:
619
  if st.button("❌ Clear "):
620
  st.session_state["current_mermaid"] = ""
621
- st.experimental_rerun()
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: