Miraj74 commited on
Commit
a4ba101
·
verified ·
1 Parent(s): 146d4b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -111,19 +111,19 @@ def clear_history():
111
  def update_input_type(choice):
112
  if choice == "Image":
113
  return (
114
- gr.update(visible=True),
115
- gr.update(visible=True),
116
- gr.update(visible=False),
117
- gr.update(visible=False),
118
- gr.update(value=False)
119
  )
120
  elif choice == "PDF(QUIZ)":
121
  return (
122
- gr.update(visible=False),
123
- gr.update(visible=False),
124
- gr.update(visible=True),
125
- gr.update(visible=True),
126
- gr.update(value=True)
127
  )
128
 
129
  # Custom CSS styling
 
111
  def update_input_type(choice):
112
  if choice == "Image":
113
  return (
114
+ gr.update(visible=True), #question box
115
+ gr.update(visible=True), #upload image
116
+ gr.update(visible=False), #no upload pdf
117
+ gr.update(visible=False), #no number of questions
118
+ gr.update(value=False) #no quiz mode
119
  )
120
  elif choice == "PDF(QUIZ)":
121
  return (
122
+ gr.update(visible=False), #question box
123
+ gr.update(visible=False), #no upload image
124
+ gr.update(visible=True), #upload pdf
125
+ gr.update(visible=True), #number of questions
126
+ gr.update(value=True) #quiz mode
127
  )
128
 
129
  # Custom CSS styling