Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import streamlit as st
|
|
2 |
import yaml # Import the pyyaml package
|
3 |
from services import ServiceOne, ServiceTwo
|
4 |
import json
|
|
|
5 |
|
6 |
# List of available services
|
7 |
services = {
|
@@ -44,8 +45,11 @@ if st.button("Run Workflow"):
|
|
44 |
with open("workflow_config.json", "w") as json_file:
|
45 |
json.dump(workflow_config, json_file, indent=4)
|
46 |
|
47 |
-
with open("workflow_config.json", "w") as json_file:
|
48 |
-
|
|
|
|
|
|
|
49 |
|
50 |
# if st.download_button("Export Workflow"):
|
51 |
# if export_format == "YAML":
|
|
|
2 |
import yaml # Import the pyyaml package
|
3 |
from services import ServiceOne, ServiceTwo
|
4 |
import json
|
5 |
+
import Path
|
6 |
|
7 |
# List of available services
|
8 |
services = {
|
|
|
45 |
with open("workflow_config.json", "w") as json_file:
|
46 |
json.dump(workflow_config, json_file, indent=4)
|
47 |
|
48 |
+
# with open("workflow_config.json", "w") as json_file:
|
49 |
+
st.download_button("Export Config",
|
50 |
+
data=Path("workflow_config.json").read_text(),
|
51 |
+
file_name="workflow_config.jsonl",
|
52 |
+
mime="application/jsonl")
|
53 |
|
54 |
# if st.download_button("Export Workflow"):
|
55 |
# if export_format == "YAML":
|