Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| def ner(text): | |
| api = gr.Interface.load("ugaray96/biobert_ncbi_disease_ner", src='models') | |
| spans = api(text) | |
| replaced_spans = [(key, None) if value=='No Disease' else (key, value) for (key, value) in spans] | |
| return replaced_spans | |
| interface = gr.Interface(ner, inputs=gr.Textbox(label="Input", value="Patient is 50 yo M experienced a right bundle branch block (RBBB) yet tests for arrythmia found no results and heart health. Top goals."), outputs="highlightedtext") | |
| interface.launch() |