Spaces:
Sleeping
Sleeping
Commit
·
23a3357
1
Parent(s):
af7eaf5
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,7 @@ input_para = '''Google was founded in 1998 by Larry Page and Sergey Brin while t
|
|
13 |
question = ['Who is current CEO?','What is IPO?','Where is headquarter of Google?','','']
|
14 |
|
15 |
Que_ans = pipeline("question-answering", model=model,tokenizer = tokenizer )
|
|
|
16 |
def generate_qna(context,input_radio,q1,q2,q3,q4,q5):
|
17 |
dic = {}
|
18 |
keys = []
|
@@ -25,7 +26,9 @@ def generate_qna(context,input_radio,q1,q2,q3,q4,q5):
|
|
25 |
final_ans.append(result['answer'])
|
26 |
keys.append(str(i))
|
27 |
print(final_ans)
|
|
|
28 |
dic = dict(zip(keys, final_ans))
|
|
|
29 |
print(dic)
|
30 |
|
31 |
return dic.get('0',''),dic.get('1',''),dic.get('2',''),dic.get('3',''),dic.get('4','')
|
|
|
13 |
question = ['Who is current CEO?','What is IPO?','Where is headquarter of Google?','','']
|
14 |
|
15 |
Que_ans = pipeline("question-answering", model=model,tokenizer = tokenizer )
|
16 |
+
|
17 |
def generate_qna(context,input_radio,q1,q2,q3,q4,q5):
|
18 |
dic = {}
|
19 |
keys = []
|
|
|
26 |
final_ans.append(result['answer'])
|
27 |
keys.append(str(i))
|
28 |
print(final_ans)
|
29 |
+
result_dic = d = [list(j) for j in zip(que_list,final_ans)]
|
30 |
dic = dict(zip(keys, final_ans))
|
31 |
+
save_data_and_sendmail(input_radio, context, result_dic):
|
32 |
print(dic)
|
33 |
|
34 |
return dic.get('0',''),dic.get('1',''),dic.get('2',''),dic.get('3',''),dic.get('4','')
|