File size: 1,646 Bytes
835771a
 
 
cc87f39
6a282b8
cc87f39
 
 
 
 
 
2ef0a3b
835771a
4a2afb3
 
835771a
f11d266
835771a
9ba4a41
835771a
 
 
2ef0a3b
835771a
c6cb13b
835771a
9ba4a41
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import gradio as gr
import model

example_input_1 = "Family-history-of-MI-OR-Family-history-of-myocardial-infarction"
example_input_2 = """HPI: 17yo M presents with palpitations. Patient reports 3-4 months of intermittent episodes of "heart beating/pounding out of my chest." 2 days ago during a soccer game had an episode, but this time had chest pressure and felt as if he were going to pass out (did not lose conciousness). Of note patient endorses abusing adderall, primarily to study (1-3 times per week). Before recent soccer game, took adderrall night before and morning of game. Denies shortness of breath, diaphoresis, fevers, chills, headache, fatigue, changes in sleep, changes in vision/hearing, abdominal paun, changes in bowel or urinary habits. 
PMHx: none
Rx: uses friends adderrall
FHx: mom with "thyroid disease,"  dad with recent heart attcak 
All: none
Immunizations: up to date
SHx: Freshmen in college. Endorses 3-4 drinks 3 nights / week (on weekends), denies tabacco, endorses trying marijuana. Sexually active with girlfriend x 1 year, uses condoms"""
example = [[example_input_1, example_input_2]]

input_1 = gr.inputs.Textbox(lines=1, placeholder='Feature Text', default="", label=None, optional=False)
input_2 = gr.inputs.Textbox(lines=5, placeholder='Patient History', default="", label=None, optional=False)

output_1 = gr.outputs.Textbox(type="auto", label=None)

iface = gr.Interface(
    model.get_predictions, 
    inputs=[input_1, input_2], 
    outputs=[output_1],
    examples=example,
    title='Identify Key Phrases in Patient Notes from Medical Licensing Exams',
    theme='dark', # 'dark'
)
iface.launch()