Spaces:
Runtime error
Runtime error
Update app.py
Browse filestensor flow true option added
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
|