Spaces:
Build error
Build error
adding print
Browse files
app.py
CHANGED
|
@@ -28,7 +28,9 @@ def text_to_sentiment(text):
|
|
| 28 |
|
| 29 |
def ner(text):
|
| 30 |
api = gr.Interface.load("dslim/bert-base-NER", src='models')
|
|
|
|
| 31 |
spans = api(text)
|
|
|
|
| 32 |
replaced_spans = [(key, None) if value=='No Disease' else (key, value) for (key, value) in spans]
|
| 33 |
return replaced_spans
|
| 34 |
|
|
|
|
| 28 |
|
| 29 |
def ner(text):
|
| 30 |
api = gr.Interface.load("dslim/bert-base-NER", src='models')
|
| 31 |
+
print (API)
|
| 32 |
spans = api(text)
|
| 33 |
+
print (spans)
|
| 34 |
replaced_spans = [(key, None) if value=='No Disease' else (key, value) for (key, value) in spans]
|
| 35 |
return replaced_spans
|
| 36 |
|