Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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.
|
23 |
-
gr.
|
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"
|