Dofla commited on
Commit
c795aa9
·
verified ·
1 Parent(s): 62d1547

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
 
2
  import gradio as gr
3
  from transformers import AutoTokenizer, AutoModelForQuestionAnswering
@@ -19,8 +20,8 @@ def question_answering(context, question):
19
  iface = gr.Interface(
20
  fn=question_answering,
21
  inputs=[
22
- gr.Interface.Text(lines=7, label="Contexte"),
23
- gr.Interface.Text(lines=1, label="Question")
24
  ],
25
  outputs="text",
26
  title="Question Answering with Hugging Face Model"
 
1
+ !pip install gradio
2
 
3
  import gradio as gr
4
  from transformers import AutoTokenizer, AutoModelForQuestionAnswering
 
20
  iface = gr.Interface(
21
  fn=question_answering,
22
  inputs=[
23
+ gr.Textbox(lines=7, label="Contexte"),
24
+ gr.Textbox(lines=1, label="Question")
25
  ],
26
  outputs="text",
27
  title="Question Answering with Hugging Face Model"