jethrovic commited on
Commit
621b222
·
1 Parent(s): 6363620

Update app.py

Browse files

tensor flow true option added

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,10 +1,11 @@
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
- # Initialize the POS tagger
5
  pos_tagger = pipeline(
6
  model="vblagoje/bert-english-uncased-finetuned-pos",
7
  aggregation_strategy="simple",
 
8
  )
9
 
10
  # Function to get color for each POS tag
 
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
+ # Initialize the POS tagger with from_pt=True for PyTorch model
5
  pos_tagger = pipeline(
6
  model="vblagoje/bert-english-uncased-finetuned-pos",
7
  aggregation_strategy="simple",
8
+ from_pt=True # Load model from PyTorch weights
9
  )
10
 
11
  # Function to get color for each POS tag