Spaces:
Sleeping
Sleeping
srinivasbt
commited on
updated to use moses tokenizer properly
Browse files
app.py
CHANGED
@@ -1,14 +1,11 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import AutoModel, AutoTokenizer, pipeline
|
3 |
-
import torch
|
4 |
-
from sacremoses import MosesTokenizer
|
5 |
|
6 |
# The model name for embeddings
|
7 |
embedding_model_name = "emilyalsentzer/Bio_ClinicalBERT"
|
8 |
|
9 |
# Load the tokenizer and model for embeddings
|
10 |
-
|
11 |
-
embedding_tokenizer = MosesTokenizer(embedding_model_name)
|
12 |
embedding_model = AutoModel.from_pretrained(embedding_model_name)
|
13 |
|
14 |
# The model name for medical question answering or opinion generation
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import AutoModel, AutoTokenizer, pipeline
|
|
|
|
|
3 |
|
4 |
# The model name for embeddings
|
5 |
embedding_model_name = "emilyalsentzer/Bio_ClinicalBERT"
|
6 |
|
7 |
# Load the tokenizer and model for embeddings
|
8 |
+
embedding_tokenizer = AutoTokenizer.from_pretrained(embedding_model_name)
|
|
|
9 |
embedding_model = AutoModel.from_pretrained(embedding_model_name)
|
10 |
|
11 |
# The model name for medical question answering or opinion generation
|