CountingMstar commited on
Commit
f3f4033
1 Parent(s): 0a1beeb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -25,23 +25,23 @@ def question_answer(context, question):
25
 
26
  def split(text):
27
  words = word_tokenize(text)
28
- context, question = '', ''
29
- act = False
30
 
31
- for w in words:
32
- if w == '///':
33
- act = True
34
 
35
- if act == False:
36
- context += w + ' '
37
- else:
38
- if w == '///':
39
- w = ''
40
- question += w + ' '
41
 
42
- context = context[:-1]
43
- question = question[1:-1]
44
- return context, question
45
 
46
  # def greet(texts):
47
  # context, question = split(texts)
 
25
 
26
  def split(text):
27
  words = word_tokenize(text)
28
+ # context, question = '', ''
29
+ # act = False
30
 
31
+ # for w in words:
32
+ # if w == '///':
33
+ # act = True
34
 
35
+ # if act == False:
36
+ # context += w + ' '
37
+ # else:
38
+ # if w == '///':
39
+ # w = ''
40
+ # question += w + ' '
41
 
42
+ # context = context[:-1]
43
+ # question = question[1:-1]
44
+ return text, words
45
 
46
  # def greet(texts):
47
  # context, question = split(texts)