Spaces:
Build error
Build error
Commit ·
994b202
1
Parent(s): 0a9e582
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,11 +18,21 @@ with st.form("my_form"):
|
|
| 18 |
col1, col2 = st.columns(2)
|
| 19 |
for x in range(st.session_state.data):
|
| 20 |
with col1:
|
| 21 |
-
f = st.file_uploader("Upload Image",type=['png', 'jpg', 'jpeg'])
|
| 22 |
st.session_state.labels.append(f)
|
| 23 |
|
| 24 |
with col2:
|
| 25 |
-
txt = st.text_area(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
st.session_state.labels.append(txt)
|
| 27 |
submitted = st.form_submit_button("Submit")
|
| 28 |
|
|
|
|
| 18 |
col1, col2 = st.columns(2)
|
| 19 |
for x in range(st.session_state.data):
|
| 20 |
with col1:
|
| 21 |
+
f = st.file_uploader("Upload Image",type=['png', 'jpg', 'jpeg'], key=f'image_{x}')
|
| 22 |
st.session_state.labels.append(f)
|
| 23 |
|
| 24 |
with col2:
|
| 25 |
+
txt = st.text_area("""Json Text
|
| 26 |
+
(example :
|
| 27 |
+
{
|
| 28 |
+
"drugs":
|
| 29 |
+
{
|
| 30 |
+
"composition" : [{"comp" : "paracetamol", "dose" : "100 mg"}],
|
| 31 |
+
"description" : "flu drugs"
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
)
|
| 35 |
+
""", key=f'label_{x}')
|
| 36 |
st.session_state.labels.append(txt)
|
| 37 |
submitted = st.form_submit_button("Submit")
|
| 38 |
|