Commit
·
153cd47
1
Parent(s):
d7d3ce3
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,9 +66,14 @@ class Application:
|
|
| 66 |
names = [row["name"] for row in config]
|
| 67 |
files = [row["file"] for row in config]
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
if selected != "--":
|
| 73 |
index = [x for x, name in enumerate(names) if name == selected][0]
|
| 74 |
with open(os.path.join(self.directory, files[index])) as f:
|
|
|
|
| 66 |
names = [row["name"] for row in config]
|
| 67 |
files = [row["file"] for row in config]
|
| 68 |
|
| 69 |
+
# Get default workflow param
|
| 70 |
+
params = st.experimental_get_query_params()
|
| 71 |
+
index = params.get("default")
|
| 72 |
+
index = index[0] if index else 0
|
| 73 |
+
if index and index in names:
|
| 74 |
+
index = names.index(index) + 1
|
| 75 |
+
|
| 76 |
+
selected = st.selectbox("Load workflow", ["--"] + names, index)
|
| 77 |
if selected != "--":
|
| 78 |
index = [x for x, name in enumerate(names) if name == selected][0]
|
| 79 |
with open(os.path.join(self.directory, files[index])) as f:
|