Spaces:
Build error
Build error
BilalSardar
commited on
Commit
•
a394b00
1
Parent(s):
0001485
Update app.py
Browse files
app.py
CHANGED
@@ -241,9 +241,9 @@ def generate_distractors(answer, count):
|
|
241 |
distractors = list(map(lambda x: x[0], closestWords))[0:count]
|
242 |
|
243 |
return distractors
|
244 |
-
context1 = gr.
|
245 |
-
output = gr.
|
246 |
-
radiobutton = gr.
|
247 |
|
248 |
def generate_question(context1,radiobutton):
|
249 |
# try:
|
@@ -279,7 +279,7 @@ def generate_question(context1,radiobutton):
|
|
279 |
summary = summary.replace(answer,"<b>"+answer+"</b>")
|
280 |
summary = summary.replace(answer.capitalize(),"<b>"+answer.capitalize()+"</b>")
|
281 |
output = output + "<p>"+summary+"</p>"
|
282 |
-
return output
|
283 |
# except:
|
284 |
# return "Something Went Wrong...Please Check Link or try Again"
|
285 |
|
|
|
241 |
distractors = list(map(lambda x: x[0], closestWords))[0:count]
|
242 |
|
243 |
return distractors
|
244 |
+
context1 = gr.Textbox(lines=10, placeholder="Enter link here...")
|
245 |
+
output = [gr.HTML( label="Question and Answers"),gr.Textbox(label="Summary")]
|
246 |
+
radiobutton = gr.Radio(["Wordnet", "Gensim"])
|
247 |
|
248 |
def generate_question(context1,radiobutton):
|
249 |
# try:
|
|
|
279 |
summary = summary.replace(answer,"<b>"+answer+"</b>")
|
280 |
summary = summary.replace(answer.capitalize(),"<b>"+answer.capitalize()+"</b>")
|
281 |
output = output + "<p>"+summary+"</p>"
|
282 |
+
return output ,summary_text
|
283 |
# except:
|
284 |
# return "Something Went Wrong...Please Check Link or try Again"
|
285 |
|