diogocarapito commited on
Commit
0806805
·
1 Parent(s): 7e0a7e9

corrections

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -9,7 +9,11 @@ pipe = pipeline("question-answering", model=model_name, tokenizer=model_name)
9
  context = "my name is diogo and i'm 32 years old, i live in portugal neraby the ocean."
10
 
11
  def q_and_a(text):
12
- return pipe(text)[0]
 
 
 
 
13
 
14
  interface = gr.Interface(
15
  fn=q_and_a,
 
9
  context = "my name is diogo and i'm 32 years old, i live in portugal neraby the ocean."
10
 
11
  def q_and_a(text):
12
+ query = {
13
+ 'question': text,
14
+ 'context': context
15
+ }
16
+ return pipe(query)[0]
17
 
18
  interface = gr.Interface(
19
  fn=q_and_a,