ysharma HF staff commited on
Commit
8bfdff7
1 Parent(s): d5fb975
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -97,11 +97,13 @@ def display_vid(url, question, sample_question=None):
97
  #sample - smUHQndcmOY?start=234
98
  html_out = "<iframe width='560' height='315' src='https://www.youtube.com/embed/" + video_id + "?start=" + str(ans_timestamp) + "' title='YouTube video player' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe>"
99
  print(f"html output is : {html_out}")
100
-
101
- print(f"Inside display_vid(), Sample_Question coming from Radio box is BEFORE : {sample_question}")
102
- sample_ques = set_example_question(sample_question)
103
- print(f"Inside display_vid(), Sample Question coming from Radio box is AFTER : {sample_ques}")
104
 
 
 
 
 
 
 
105
  return html_out, sample_ques
106
 
107
  def set_example_question(sample_question):
 
97
  #sample - smUHQndcmOY?start=234
98
  html_out = "<iframe width='560' height='315' src='https://www.youtube.com/embed/" + video_id + "?start=" + str(ans_timestamp) + "' title='YouTube video player' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe>"
99
  print(f"html output is : {html_out}")
 
 
 
 
100
 
101
+ if question == '':
102
+ print(f"Inside display_vid(), Sample_Question coming from Radio box is BEFORE : {sample_question}")
103
+ sample_ques = set_example_question(sample_question)
104
+ print(f"Inside display_vid(), Sample Question coming from Radio box is AFTER : {sample_ques}")
105
+ else:
106
+ sample_ques = question
107
  return html_out, sample_ques
108
 
109
  def set_example_question(sample_question):