Spaces:
Build error
Build error
Download app.py from ocordes/BioMedCaseContexHighlight: direct link, hf CLI and curl.
- Browser
- Download file 522 Bytes
-
https://huggingface.co/spaces/ocordes/BioMedCaseContexHighlight/resolve/main/app.py
- Command line
-
hf download hf://spaces/ocordes/BioMedCaseContexHighlight/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ocordes/BioMedCaseContexHighlight/resolve/main/app.py
522 Bytes
| 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() |