Pranjal12345 commited on
Commit
73dce56
1 Parent(s): b354cf3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -16,11 +16,18 @@ def generate_question_answer_pairs(input_text):
16
  sentences = re.split(r'(?<=[.!?])', input_text)
17
  outputs = []
18
 
19
- for i in range(len(sentences)):
20
- output = query({
21
- "inputs": sentences[i],
22
- })
23
- outputs.append(output)
 
 
 
 
 
 
 
24
 
25
  return outputs
26
 
 
16
  sentences = re.split(r'(?<=[.!?])', input_text)
17
  outputs = []
18
 
19
+ # for i in range(len(sentences)):
20
+ # output = query({
21
+ # "inputs": sentences[i],
22
+ # })
23
+ # outputs.append(output)
24
+
25
+ for sentence in sentences:
26
+ if sentence.strip():
27
+ output = query({
28
+ "inputs": sentence,
29
+ })
30
+ outputs.append(output)
31
 
32
  return outputs
33