BrightBlueCheese commited on
Commit
a4c4e65
1 Parent(s): c57aa77
Files changed (2) hide show
  1. .ipynb_checkpoints/app-checkpoint.py +8 -3
  2. app.py +8 -3
.ipynb_checkpoints/app-checkpoint.py CHANGED
@@ -43,9 +43,9 @@ torch.manual_seed(1004)
43
  np.random.seed(1004)
44
 
45
  st.title('Sol-LLaMA')
46
- smiles_str = st.text_area('Enter SMILE string', value='CC(=C=C(C)C)C')
47
 
48
- file_path = './smiles_str.txt'
 
49
  # # Open the file in write mode ('w') and write the content
50
  # with open(file_path, 'w') as file:
51
  # file.write(smiles_str)
@@ -56,7 +56,10 @@ file_path = './smiles_str.txt'
56
  # solute_or_solvent = 'solute'
57
 
58
  solute_or_solvent = st.selectbox('Solute or Solvent', ['Solute', 'Solvent'])
59
-
 
 
 
60
 
61
  class ChemLlama(nn.Module):
62
  def __init__(
@@ -309,3 +312,5 @@ if st.button('Predict'):
309
  # https://docs.streamlit.io/develop/api-reference/data/st.dataframe
310
  # https://docs.streamlit.io/get-started/tutorials/create-an-app
311
  # https://www.datacamp.com/tutorial/streamlit
 
 
 
43
  np.random.seed(1004)
44
 
45
  st.title('Sol-LLaMA')
 
46
 
47
+
48
+ # file_path = './smiles_str.txt'
49
  # # Open the file in write mode ('w') and write the content
50
  # with open(file_path, 'w') as file:
51
  # file.write(smiles_str)
 
56
  # solute_or_solvent = 'solute'
57
 
58
  solute_or_solvent = st.selectbox('Solute or Solvent', ['Solute', 'Solvent'])
59
+ if solute_or_solvent == 'Solute':
60
+ smiles_str = st.text_area('Enter SMILE string', value='Clc1ccc(cc1)N(=O)=O')
61
+ elif solute_or_solvent == 'Solvent':
62
+ smiles_str = st.text_area('Enter SMILE string', value='ClCCCl')
63
 
64
  class ChemLlama(nn.Module):
65
  def __init__(
 
312
  # https://docs.streamlit.io/develop/api-reference/data/st.dataframe
313
  # https://docs.streamlit.io/get-started/tutorials/create-an-app
314
  # https://www.datacamp.com/tutorial/streamlit
315
+
316
+ # https://huggingface.co/spaces/ttmn/chemllama-demo
app.py CHANGED
@@ -43,9 +43,9 @@ torch.manual_seed(1004)
43
  np.random.seed(1004)
44
 
45
  st.title('Sol-LLaMA')
46
- smiles_str = st.text_area('Enter SMILE string', value='CC(=C=C(C)C)C')
47
 
48
- file_path = './smiles_str.txt'
 
49
  # # Open the file in write mode ('w') and write the content
50
  # with open(file_path, 'w') as file:
51
  # file.write(smiles_str)
@@ -56,7 +56,10 @@ file_path = './smiles_str.txt'
56
  # solute_or_solvent = 'solute'
57
 
58
  solute_or_solvent = st.selectbox('Solute or Solvent', ['Solute', 'Solvent'])
59
-
 
 
 
60
 
61
  class ChemLlama(nn.Module):
62
  def __init__(
@@ -309,3 +312,5 @@ if st.button('Predict'):
309
  # https://docs.streamlit.io/develop/api-reference/data/st.dataframe
310
  # https://docs.streamlit.io/get-started/tutorials/create-an-app
311
  # https://www.datacamp.com/tutorial/streamlit
 
 
 
43
  np.random.seed(1004)
44
 
45
  st.title('Sol-LLaMA')
 
46
 
47
+
48
+ # file_path = './smiles_str.txt'
49
  # # Open the file in write mode ('w') and write the content
50
  # with open(file_path, 'w') as file:
51
  # file.write(smiles_str)
 
56
  # solute_or_solvent = 'solute'
57
 
58
  solute_or_solvent = st.selectbox('Solute or Solvent', ['Solute', 'Solvent'])
59
+ if solute_or_solvent == 'Solute':
60
+ smiles_str = st.text_area('Enter SMILE string', value='Clc1ccc(cc1)N(=O)=O')
61
+ elif solute_or_solvent == 'Solvent':
62
+ smiles_str = st.text_area('Enter SMILE string', value='ClCCCl')
63
 
64
  class ChemLlama(nn.Module):
65
  def __init__(
 
312
  # https://docs.streamlit.io/develop/api-reference/data/st.dataframe
313
  # https://docs.streamlit.io/get-started/tutorials/create-an-app
314
  # https://www.datacamp.com/tutorial/streamlit
315
+
316
+ # https://huggingface.co/spaces/ttmn/chemllama-demo