Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Andrew Stirn
commited on
Commit
·
81661d3
1
Parent(s):
50f9a1a
bug fix
Browse files
app.py
CHANGED
|
@@ -32,6 +32,7 @@ if manual_input:
|
|
| 32 |
manual_entry.write('Transcript must be at least {:d} bases.'.format(TARGET_LEN))
|
| 33 |
else:
|
| 34 |
st.session_state['manual_seq'] = manual_input
|
|
|
|
| 35 |
|
| 36 |
# fasta input
|
| 37 |
fasta_form = st.form('fasta')
|
|
@@ -49,13 +50,14 @@ if fasta_input:
|
|
| 49 |
fasta_form.write(transcript_tbl)
|
| 50 |
seq = transcript_tbl['seq'][0]
|
| 51 |
st.session_state['fasta_seq'] = seq
|
|
|
|
| 52 |
|
| 53 |
# input-specific configuration
|
| 54 |
-
if
|
| 55 |
src_seq = st.session_state['manual_seq']
|
| 56 |
status_text = manual_entry.empty()
|
| 57 |
status_bar = manual_entry.progress(0)
|
| 58 |
-
elif
|
| 59 |
src_seq = st.session_state['fasta_seq']
|
| 60 |
status_text = fasta_form.empty()
|
| 61 |
status_bar = fasta_form.progress(0)
|
|
|
|
| 32 |
manual_entry.write('Transcript must be at least {:d} bases.'.format(TARGET_LEN))
|
| 33 |
else:
|
| 34 |
st.session_state['manual_seq'] = manual_input
|
| 35 |
+
manual_mode = manual_entry.form_submit_button(label='calculate')
|
| 36 |
|
| 37 |
# fasta input
|
| 38 |
fasta_form = st.form('fasta')
|
|
|
|
| 50 |
fasta_form.write(transcript_tbl)
|
| 51 |
seq = transcript_tbl['seq'][0]
|
| 52 |
st.session_state['fasta_seq'] = seq
|
| 53 |
+
fasta_mode = fasta_form.form_submit_button(label='Calculate')
|
| 54 |
|
| 55 |
# input-specific configuration
|
| 56 |
+
if manual_mode:
|
| 57 |
src_seq = st.session_state['manual_seq']
|
| 58 |
status_text = manual_entry.empty()
|
| 59 |
status_bar = manual_entry.progress(0)
|
| 60 |
+
elif fasta_mode:
|
| 61 |
src_seq = st.session_state['fasta_seq']
|
| 62 |
status_text = fasta_form.empty()
|
| 63 |
status_bar = fasta_form.progress(0)
|