abhilash1910 commited on
Commit
4b044b6
·
1 Parent(s): e3d993b

Initial Commit

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -43,4 +43,5 @@ result=nlp_QA(QA_inp)
43
  question='How many parameters does Bert large have?'
44
  context='Bert large is really big... it has 24 layers, for a total of 340M parameters.Altogether it is 1.34 GB so expect it to take a couple minutes to download to your Colab instance.'
45
  title = 'Question Answering demo with Albert QA transformer and gradio'
46
- interface = gr.Interface.from_pipeline(inference,title = title,theme = "peach",examples = [[context, question]]).launch()
 
 
43
  question='How many parameters does Bert large have?'
44
  context='Bert large is really big... it has 24 layers, for a total of 340M parameters.Altogether it is 1.34 GB so expect it to take a couple minutes to download to your Colab instance.'
45
  title = 'Question Answering demo with Albert QA transformer and gradio'
46
+ gr.Interface(inference,inputs=[gr.inputs.Textbox(lines=7, default=context, label="context"), gr.inputs.Textbox(lines=2, default=question, label="question")],
47
+ outputs=[gr.outputs.Textbox(label="answer"), gr.outputs.Textbox(label="Score")],title = title,theme = "peach").launch()