Spaces:
Runtime error
Runtime error
vinayakdev
commited on
Commit
•
0f34a00
1
Parent(s):
af65bb9
Print formatted string
Browse files- generator.py +1 -1
generator.py
CHANGED
@@ -90,7 +90,7 @@ def QA(question, context):
|
|
90 |
output = tokenizer.decode(predict_answer_tokens, skip_special_tokens=True)
|
91 |
output = string.capwords(output)
|
92 |
if output.isspace() or len(output) == 0:
|
93 |
-
return "Possible question : {question}\n Answer could not be generated accurately."
|
94 |
return f"Q. {question} \n Ans. {output}"
|
95 |
# QA("What was the first C program","The first prgram written in C was Hello World")
|
96 |
|
|
|
90 |
output = tokenizer.decode(predict_answer_tokens, skip_special_tokens=True)
|
91 |
output = string.capwords(output)
|
92 |
if output.isspace() or len(output) == 0:
|
93 |
+
return f"Possible question : {question}\n Answer could not be generated accurately."
|
94 |
return f"Q. {question} \n Ans. {output}"
|
95 |
# QA("What was the first C program","The first prgram written in C was Hello World")
|
96 |
|