Tabish009 commited on
Commit
4275fe6
1 Parent(s): 9c5a42a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -1,6 +1,11 @@
1
  import streamlit as st
2
  from transformers import AutoModel, AutoTokenizer
 
 
3
 
 
 
 
4
  # Load BioMistral model and tokenizer
5
  tokenizer = AutoTokenizer.from_pretrained("BioMistral/BioMistral-7B")
6
  model = AutoModel.from_pretrained("BioMistral/BioMistral-7B")
 
1
  import streamlit as st
2
  from transformers import AutoModel, AutoTokenizer
3
+ from transformers import LlamaTokenizer, LlamaForCausalLM
4
+ from biomistral import BioMistral
5
 
6
+ tokenizer = LlamaTokenizer.from_pretrained("BioMistral/BioMistral-7B")
7
+ model = LlamaForCausalLM.from_pretrained("BioMistral/BioMistral-7B")
8
+ biomistral = BioMistral(model=model, tokenizer=tokenizer)
9
  # Load BioMistral model and tokenizer
10
  tokenizer = AutoTokenizer.from_pretrained("BioMistral/BioMistral-7B")
11
  model = AutoModel.from_pretrained("BioMistral/BioMistral-7B")