srinivasbt commited on
Commit
404113b
·
verified ·
1 Parent(s): d7f6dbe

updated to use moses tokenizer properly

Browse files
Files changed (1) hide show
  1. app.py +1 -4
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
- # embedding_tokenizer = AutoTokenizer.from_pretrained(embedding_model_name)
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