Commit
·
a95b184
1
Parent(s):
eade6a1
Update app.py
Browse files
app.py
CHANGED
|
@@ -92,18 +92,7 @@ class Application:
|
|
| 92 |
names = [row["name"] for row in config]
|
| 93 |
files = [row["file"] for row in config]
|
| 94 |
|
| 95 |
-
|
| 96 |
-
params = st.experimental_get_query_params()
|
| 97 |
-
index = params.get("default")
|
| 98 |
-
index = index[0] if index else 0
|
| 99 |
-
lnames = [name.lower() for name in names]
|
| 100 |
-
|
| 101 |
-
if index and index.lower() in lnames:
|
| 102 |
-
index = lnames.index(index.lower()) + 1
|
| 103 |
-
else:
|
| 104 |
-
index = 0
|
| 105 |
-
|
| 106 |
-
selected = st.selectbox("Load workflow", ["--"] + names, index)
|
| 107 |
if selected != "--":
|
| 108 |
index = [x for x, name in enumerate(names) if name == selected][0]
|
| 109 |
with open(os.path.join(self.directory, files[index])) as f:
|
|
|
|
| 92 |
names = [row["name"] for row in config]
|
| 93 |
files = [row["file"] for row in config]
|
| 94 |
|
| 95 |
+
selected = st.selectbox("Load workflow", ["--"] + names, self.default(names))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
if selected != "--":
|
| 97 |
index = [x for x, name in enumerate(names) if name == selected][0]
|
| 98 |
with open(os.path.join(self.directory, files[index])) as f:
|