Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
from rdkit.Chem import Draw
|
4 |
from rdkit import Chem
|
@@ -6,7 +7,7 @@ import selfies as sf
|
|
6 |
|
7 |
sf_input
|
8 |
def greet1(name):
|
9 |
-
|
10 |
model = AutoModelForSeq2SeqLM.from_pretrained("zjunlp/MolGen")
|
11 |
|
12 |
sf_input = tokenizer(name, return_tensors="pt")
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
3 |
|
4 |
from rdkit.Chem import Draw
|
5 |
from rdkit import Chem
|
|
|
7 |
|
8 |
sf_input
|
9 |
def greet1(name):
|
10 |
+
tokenizer = AutoTokenizer.from_pretrained("zjunlp/MolGen")
|
11 |
model = AutoModelForSeq2SeqLM.from_pretrained("zjunlp/MolGen")
|
12 |
|
13 |
sf_input = tokenizer(name, return_tensors="pt")
|