lorenpe2 commited on
Commit
c9566b5
·
1 Parent(s): 254630f

FIX: not using match (supported > Python 3.10)

Browse files
Files changed (1) hide show
  1. app.py +15 -7
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
- match option.split("-")[0].strip():
101
- case "03":
102
- text = json.dumps(choices[0])
103
- case "04":
104
- text = json.dumps(choices[1])
105
- case _:
106
- text = ""
 
 
 
 
 
 
 
 
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: