Spaces:
Build error
Build error
BilalSardar
commited on
Commit
•
a2f0fa3
1
Parent(s):
f5e9a00
Update app.py
Browse files
app.py
CHANGED
@@ -248,7 +248,7 @@ def generate_distractors(answer, count):
|
|
248 |
|
249 |
return distractors
|
250 |
context1 = gr.Textbox(lines=10, placeholder="Enter link here...")
|
251 |
-
output = [gr.HTML( label="Question and Answers"),gr.Textbox(label="Summary")]
|
252 |
radiobutton = gr.Radio(["Wordnet", "Gensim"])
|
253 |
|
254 |
def generate_question(context1,radiobutton):
|
@@ -280,11 +280,11 @@ def generate_question(context1,radiobutton):
|
|
280 |
output = output + " <b style='color:brown;'>" + distractor+ "</b>\n"
|
281 |
output = output + "<br>"
|
282 |
|
283 |
-
summary ="Summary: "+ summary_text
|
284 |
-
for answer in np:
|
285 |
-
|
286 |
-
|
287 |
-
output = output + "<p>"+summary+"</p>"
|
288 |
return output ,summary_text
|
289 |
# except:
|
290 |
# return "Something Went Wrong...Please Check Link or try Again"
|
@@ -295,6 +295,6 @@ iface = gr.Interface(
|
|
295 |
inputs=[context1,radiobutton],
|
296 |
title="VidQuest",
|
297 |
examples=[["https://www.youtube.com/watch?v=WSbgixdC9g8","Gensim"]],
|
298 |
-
description="Keep in mind that it might take some minutes. Correct answers appear in green, while incorrect choices appear in red. Use the Gensim tool to find the most appropriate distractions.",
|
299 |
outputs=output)
|
300 |
iface.launch(debug=True)
|
|
|
248 |
|
249 |
return distractors
|
250 |
context1 = gr.Textbox(lines=10, placeholder="Enter link here...")
|
251 |
+
output = [gr.HTML( label="Question and Answers"),gr.Textbox(label="YT Video Summary")]
|
252 |
radiobutton = gr.Radio(["Wordnet", "Gensim"])
|
253 |
|
254 |
def generate_question(context1,radiobutton):
|
|
|
280 |
output = output + " <b style='color:brown;'>" + distractor+ "</b>\n"
|
281 |
output = output + "<br>"
|
282 |
|
283 |
+
# summary ="Summary: "+ summary_text
|
284 |
+
# for answer in np:
|
285 |
+
# summary = summary.replace(answer,"<b>"+answer+"</b>")
|
286 |
+
# summary = summary.replace(answer.capitalize(),"<b>"+answer.capitalize()+"</b>")
|
287 |
+
# output = output + "<p>"+summary+"</p>"
|
288 |
return output ,summary_text
|
289 |
# except:
|
290 |
# return "Something Went Wrong...Please Check Link or try Again"
|
|
|
295 |
inputs=[context1,radiobutton],
|
296 |
title="VidQuest",
|
297 |
examples=[["https://www.youtube.com/watch?v=WSbgixdC9g8","Gensim"]],
|
298 |
+
description="This Space Generates MCQs from a Youtube video.Keep in mind that it might take some minutes. Correct answers appear in green, while incorrect choices appear in red. Use the Gensim tool to find the most appropriate distractions.",
|
299 |
outputs=output)
|
300 |
iface.launch(debug=True)
|