Spaces:
Runtime error
Runtime error
FIX: not using match (supported > Python 3.10)
Browse files
app.py
CHANGED
@@ -97,13 +97,21 @@ with st.form("input_text"):
|
|
97 |
from data.example_data import ca_ood, elysai
|
98 |
choices = [ca_ood, elysai]
|
99 |
option: str
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
context = st.text_area("Insert JSON here:", value=str(text))
|
108 |
|
109 |
if "{" in context:
|
|
|
97 |
from data.example_data import ca_ood, elysai
|
98 |
choices = [ca_ood, elysai]
|
99 |
option: str
|
100 |
+
# > Python 3.10
|
101 |
+
# match option.split("-")[0].strip():
|
102 |
+
# case "03":
|
103 |
+
# text = json.dumps(choices[0])
|
104 |
+
# case "04":
|
105 |
+
# text = json.dumps(choices[1])
|
106 |
+
# case _:
|
107 |
+
# text = ""
|
108 |
+
option = option.split("-")[0].strip()
|
109 |
+
if option == "03":
|
110 |
+
text = json.dumps(choices[0])
|
111 |
+
elif option == "04":
|
112 |
+
text = json.dumps(choices[1])
|
113 |
+
else:
|
114 |
+
test = ""
|
115 |
context = st.text_area("Insert JSON here:", value=str(text))
|
116 |
|
117 |
if "{" in context:
|