Andrew Stirn commited on
Commit
a1b3810
·
1 Parent(s): 59874d6

context len added

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import streamlit as st
2
- from tiger import tiger_predict, GUIDE_LEN, NUCLEOTIDE_TOKENS
3
 
4
 
5
  @st.cache
@@ -15,9 +15,9 @@ st.session_state['userInput'] = st.text_input('Enter a target transcript (or sub
15
  placeholder='Upper or lower case')
16
 
17
  # input is too short
18
- if len(st.session_state['userInput']) < GUIDE_LEN:
19
  transcript_len = len(st.session_state['userInput'])
20
- st.write('Transcript length ({:d}) must be at least {:d} bases.'.format(transcript_len, GUIDE_LEN))
21
 
22
  # valid input
23
  elif all([True if nt.upper() in NUCLEOTIDE_TOKENS.keys() else False for nt in st.session_state['userInput']]):
 
1
  import streamlit as st
2
+ from tiger import tiger_predict, TARGET_LEN, NUCLEOTIDE_TOKENS
3
 
4
 
5
  @st.cache
 
15
  placeholder='Upper or lower case')
16
 
17
  # input is too short
18
+ if len(st.session_state['userInput']) < TARGET_LEN:
19
  transcript_len = len(st.session_state['userInput'])
20
+ st.write('Transcript length ({:d}) must be at least {:d} bases.'.format(transcript_len, TARGET_LEN))
21
 
22
  # valid input
23
  elif all([True if nt.upper() in NUCLEOTIDE_TOKENS.keys() else False for nt in st.session_state['userInput']]):