savakholin commited on
Commit
ce52bcc
1 Parent(s): 508147b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -1,4 +1,16 @@
1
  import streamlit as st
 
 
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x, '. Also, Dania is gay')
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
+ from transformers import AutoTokenizer, EsmModel
3
+ import torch
4
 
5
+ model_name = "facebook/esm2_t6_8M_UR50D"
6
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
7
+ model = EsmModel.from_pretrained(model_name)
8
+
9
+ aa_seq = st.text_input('Type AA sequance here')
10
+
11
+ inputs = tokenizer(aa_seq, return_tensors="pt")
12
+ outputs = model(**inputs)
13
+
14
+ last_hidden_states = outputs.last_hidden_state
15
+
16
+ st.write(model_name, 'last hidden states',last_hidden_states.shape, last_hidden_states, 'Also, Dania is not gay')