nadiinchi commited on
Commit
30d70a0
·
verified ·
1 Parent(s): 3ee21cf

Update modeling_provence.py

Browse files
Files changed (1) hide show
  1. modeling_provence.py +4 -4
modeling_provence.py CHANGED
@@ -99,8 +99,8 @@ class Provence(DebertaV2PreTrainedModel):
99
 
100
  def process(
101
  self,
 
102
  context: Union[List[List[str]], List[str], str],
103
- query: Union[List[str], str],
104
  title: Optional[Union[List[List[str]], List[str], str]] = "first_sentence",
105
  batch_size=32,
106
  threshold=0.1,
@@ -111,10 +111,10 @@ class Provence(DebertaV2PreTrainedModel):
111
  ):
112
 
113
  # convert input format into queries of type List[str] and contexts/titles of type List[List[str]]
114
- if type(query) == str:
115
- queries = [query]
116
  else: # list of strs
117
- queries = query
118
  if type(context) == str:
119
  contexts = [[context]]
120
  elif type(context) == list and type(context[0]) == str:
 
99
 
100
  def process(
101
  self,
102
+ question: Union[List[str], str],
103
  context: Union[List[List[str]], List[str], str],
 
104
  title: Optional[Union[List[List[str]], List[str], str]] = "first_sentence",
105
  batch_size=32,
106
  threshold=0.1,
 
111
  ):
112
 
113
  # convert input format into queries of type List[str] and contexts/titles of type List[List[str]]
114
+ if type(question) == str:
115
+ queries = [question]
116
  else: # list of strs
117
+ queries = question
118
  if type(context) == str:
119
  contexts = [[context]]
120
  elif type(context) == list and type(context[0]) == str: