NiniCat commited on
Commit
6a7c0e6
1 Parent(s): be6292e

add enzyme buttons

Browse files
Files changed (1) hide show
  1. app.py +20 -10
app.py CHANGED
@@ -9,25 +9,35 @@ ENTRY_METHODS = dict(
9
  fasta="Fasta file upload (supports multiple transcripts if they have unique ID's)"
10
  )
11
  CRISPR_MODELS = ['Cas9', 'Cas12', 'Cas13d']
 
12
  selected_model = st.selectbox('Select CRISPR model:', CRISPR_MODELS, key='selected_model')
13
 
14
- def load_model(model_name):
15
- if model_name == 'Cas9':
16
- # Placeholder for Cas9 model loading
17
- # TODO: Implement Cas9 model loading logic
18
- raise NotImplementedError("Cas9 model loading not implemented yet.")
19
- elif model_name == 'Cas12':
 
 
 
 
 
 
 
 
 
 
20
  # Placeholder for Cas12 model loading
21
  # TODO: Implement Cas12 model loading logic
22
  raise NotImplementedError("Cas12 model loading not implemented yet.")
23
- elif model_name == 'Cas13d':
24
  # Assuming tiger module is for Cas13
25
- return tiger.load_model() # Assuming there's a load_model function in tiger.py
26
- else:
27
  raise ValueError(f"Unknown model: {model_name}")
28
 
29
 
30
-
31
  @st.cache_data
32
  def convert_df(df):
33
  # IMPORTANT: Cache the conversion to prevent computation on every rerun
 
9
  fasta="Fasta file upload (supports multiple transcripts if they have unique ID's)"
10
  )
11
  CRISPR_MODELS = ['Cas9', 'Cas12', 'Cas13d']
12
+
13
  selected_model = st.selectbox('Select CRISPR model:', CRISPR_MODELS, key='selected_model')
14
 
15
+ # Check if the selected model is Cas9
16
+ if selected_model == 'Cas9':
17
+ # Display buttons for the Cas9 model
18
+ if st.button('SPCas9_U6'):
19
+ # Placeholder for action when SPCas9_U6 is clicked
20
+ pass
21
+ if st.button('SPCas9_t7'):
22
+ # Placeholder for action when SPCas9_t7 is clicked
23
+ pass
24
+ if st.button('eSPCas9'):
25
+ # Placeholder for action when eSPCas9 is clicked
26
+ pass
27
+ if st.button('SPCas9_HF1'):
28
+ # Placeholder for action when SPCas9_HF1 is clicked
29
+ pass
30
+ elif model_name == 'Cas12':
31
  # Placeholder for Cas12 model loading
32
  # TODO: Implement Cas12 model loading logic
33
  raise NotImplementedError("Cas12 model loading not implemented yet.")
34
+ elif model_name == 'Cas13d':
35
  # Assuming tiger module is for Cas13
36
+ tiger.load_model() # Assuming there's a load_model function in tiger.py
37
+ else:
38
  raise ValueError(f"Unknown model: {model_name}")
39
 
40
 
 
41
  @st.cache_data
42
  def convert_df(df):
43
  # IMPORTANT: Cache the conversion to prevent computation on every rerun