Spaces:
Sleeping
Sleeping
feat: add different pLMs as input
Browse files
README.md
CHANGED
|
@@ -11,3 +11,5 @@ short_description: 'input: protein sequences; output: embeddings'
|
|
| 11 |
---
|
| 12 |
|
| 13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 14 |
+
|
| 15 |
+
Minimal example Gradio app for inputting protein sequences and outputting protein LLM embeddings.
|
app.py
CHANGED
|
@@ -1,9 +1,16 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from embed import gen_embedding
|
| 3 |
|
| 4 |
-
def generate_embeddings(sequences):
|
| 5 |
-
embeddings = gen_embedding(sequences, plm_model=
|
| 6 |
return embeddings.tolist()
|
| 7 |
|
| 8 |
-
demo = gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from embed import gen_embedding
|
| 3 |
|
| 4 |
+
def generate_embeddings(sequences, plm_model):
|
| 5 |
+
embeddings = gen_embedding(sequences, plm_model=plm_model)
|
| 6 |
return embeddings.tolist()
|
| 7 |
|
| 8 |
+
demo = gr.Interface(
|
| 9 |
+
fn=generate_embeddings,
|
| 10 |
+
inputs=[
|
| 11 |
+
"text",
|
| 12 |
+
gr.Dropdown(choices=["esm1b", "esm2", "prott5", "prostt5"], label="PLM Model")
|
| 13 |
+
],
|
| 14 |
+
outputs="text"
|
| 15 |
+
)
|
| 16 |
demo.launch()
|