Beehzod commited on
Commit
bec4c85
·
verified ·
1 Parent(s): 58a883e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -9,6 +9,7 @@
9
  # if text:
10
  # out = pipe(text)
11
  # st.json(out)
 
12
  from transformers import pipeline
13
 
14
  # Load the model from the Hugging Face Hub
@@ -19,5 +20,5 @@ text = "Hugging Face Inc. is based in New York City, and its CEO is Clement Dela
19
  results = ner_pipeline(text)
20
 
21
  for entity in results:
22
- #print(f"Entity: {entity['word']}, Label: {entity['entity']}, Score: {entity['score']:.4f}")
23
  st.json(entity)
 
9
  # if text:
10
  # out = pipe(text)
11
  # st.json(out)
12
+ import streamlit as st
13
  from transformers import pipeline
14
 
15
  # Load the model from the Hugging Face Hub
 
20
  results = ner_pipeline(text)
21
 
22
  for entity in results:
23
+ print(f"Entity: {entity['word']}, Label: {entity['entity']}, Score: {entity['score']:.4f}")
24
  st.json(entity)