shripadbhat commited on
Commit
ef4afbb
·
1 Parent(s): 423f458

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -10,7 +10,7 @@ from sentence_transformers import CrossEncoder
10
 
11
  from transformers import pipeline
12
 
13
- text2text_generator = pipeline("text2text-generation")
14
 
15
  sentence_segmenter = pysbd.Segmenter(language='en',clean=False)
16
  passage_retreival_model = CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2')
@@ -60,11 +60,10 @@ demo = gr.Interface(
60
  fn=fetch_answers,
61
  #take input as real time audio and use OPENAPI whisper for S2T
62
  #clinical note upload as file (.This is an example of simple text. or doc/docx file)
63
- inputs=[gr.Textbox(lines=2, label='Question', show_label=True, placeholder="What is age of patient ?"),
64
- gr.Textbox(lines=10, label='Clinical Note', show_label=True, placeholder="The patient is a 71 year old male...")],
65
  outputs="markdown",
66
  examples='.',
67
- title='Question Answering System from Clinical Notes for Physicians',
68
- description="""Physicians frequently seek answers to questions from a patient’s EHR to support clinical decision-making.​ It is not too hard to imagine a future where a physician interacts with an EHR system and asks it complex questions and expects precise answers with adequate context from a patient’s past clinical notes. ​Central to such a world is a medical question answering system that processes natural language questions asked by physicians and finds answers to the questions from all sources in a patient’s record."""
69
  )
70
  demo.launch()
 
10
 
11
  from transformers import pipeline
12
 
13
+ text2text_generator = pipeline("text2text-generation", model = "bigscience/T0")
14
 
15
  sentence_segmenter = pysbd.Segmenter(language='en',clean=False)
16
  passage_retreival_model = CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2')
 
60
  fn=fetch_answers,
61
  #take input as real time audio and use OPENAPI whisper for S2T
62
  #clinical note upload as file (.This is an example of simple text. or doc/docx file)
63
+ inputs=[gr.Textbox(lines=2, label='Question', show_label=True),
64
+ gr.Textbox(lines=10, label='Document Text', show_label=True)],
65
  outputs="markdown",
66
  examples='.',
67
+ title='Document Question Answering System with Evidence from document'
 
68
  )
69
  demo.launch()