Spaces:
Sleeping
Sleeping
In the process of adding switch and topic dropdown
Browse files
app.py
CHANGED
|
@@ -104,6 +104,142 @@ BIO_TOPICS = [
|
|
| 104 |
|
| 105 |
chosen_topic = None
|
| 106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
# Create the Gradio interface
|
| 109 |
with gr.Blocks() as demo:
|
|
|
|
| 104 |
|
| 105 |
chosen_topic = None
|
| 106 |
|
| 107 |
+
# Topic list
|
| 108 |
+
CELL_BIO_TOPICS = [
|
| 109 |
+
"Eukaryotes and prokaryotes",
|
| 110 |
+
"Animal and plant cells",
|
| 111 |
+
"Cell specialisation",
|
| 112 |
+
"Cell differentiation",
|
| 113 |
+
"Microscopy",
|
| 114 |
+
"Culturing microorganisms (biology only)",
|
| 115 |
+
"Chromosomes",
|
| 116 |
+
"Mitosis and the cell cycle",
|
| 117 |
+
"Stem cells",
|
| 118 |
+
"Diffusion",
|
| 119 |
+
"Osmosis",
|
| 120 |
+
"Active transport"
|
| 121 |
+
]
|
| 122 |
+
|
| 123 |
+
ORGANISATION_TOPICS = [
|
| 124 |
+
"Principles of organisation",
|
| 125 |
+
"The human digestive system",
|
| 126 |
+
"The heart and blood vessels",
|
| 127 |
+
"Blood",
|
| 128 |
+
"Coronary heart disease: a non-communicable disease",
|
| 129 |
+
"Health issues",
|
| 130 |
+
"The effect of lifestyle on some non-communicable diseases",
|
| 131 |
+
"Cancer",
|
| 132 |
+
"Plant tissues",
|
| 133 |
+
"Plant organ system"
|
| 134 |
+
]
|
| 135 |
+
|
| 136 |
+
# Topic list
|
| 137 |
+
INFECTION_AND_RESPONSE_TOPICS = [
|
| 138 |
+
"Communicable (infectious) diseases",
|
| 139 |
+
"Viral diseases",
|
| 140 |
+
"Bacterial diseases",
|
| 141 |
+
"Fungal diseases",
|
| 142 |
+
"Protist diseases",
|
| 143 |
+
"Human defence systems",
|
| 144 |
+
"Vaccination",
|
| 145 |
+
"Antibiotics and painkillers",
|
| 146 |
+
"Discovery and development of drugs",
|
| 147 |
+
"Producing monoclonal antibodies",
|
| 148 |
+
"Uses of monoclonal antibodies",
|
| 149 |
+
"Detection and identification of plant diseases",
|
| 150 |
+
"Plant defence responses"
|
| 151 |
+
]
|
| 152 |
+
|
| 153 |
+
BIOENERGETICS_TOPICS = [
|
| 154 |
+
"Photosynthetic reaction",
|
| 155 |
+
"Rate of photosynthesis",
|
| 156 |
+
"Uses of glucose from photosynthesis",
|
| 157 |
+
"Aerobic and anaerobic respiration",
|
| 158 |
+
"Response to exercise",
|
| 159 |
+
"Metabolism"
|
| 160 |
+
]
|
| 161 |
+
|
| 162 |
+
# Topic list
|
| 163 |
+
HOMEOSTASIS_AND_RESPONSE_TOPICS = [
|
| 164 |
+
"Homeostasis",
|
| 165 |
+
"Structure and function",
|
| 166 |
+
"The brain (biology only)",
|
| 167 |
+
"The eye (biology only)",
|
| 168 |
+
"Control of body temperature (biology only)",
|
| 169 |
+
"Human endocrine system",
|
| 170 |
+
"Control of blood glucose concentration",
|
| 171 |
+
"Maintaining water and nitrogen balance in the body (biology only)",
|
| 172 |
+
"Hormones in human reproduction",
|
| 173 |
+
"Contraception",
|
| 174 |
+
"The use of hormones to treat infertility (HT only)",
|
| 175 |
+
"Feedback systems (HT only)",
|
| 176 |
+
"Control and coordination",
|
| 177 |
+
"Use of plant hormones (HT only)",
|
| 178 |
+
]
|
| 179 |
+
|
| 180 |
+
INHERITANCE_VARIATION_AND_EVOLUTION_TOPICS = [
|
| 181 |
+
"Sexual and asexual reproduction",
|
| 182 |
+
"Meiosis",
|
| 183 |
+
"Advantages and disadvantages of sexual and asexual reproduction (biology only)",
|
| 184 |
+
"DNA and the genome",
|
| 185 |
+
"DNA structure (biology only)",
|
| 186 |
+
"Genetic inheritance",
|
| 187 |
+
"Inherited disorders",
|
| 188 |
+
"Sex determination",
|
| 189 |
+
"Variation",
|
| 190 |
+
"Evolution",
|
| 191 |
+
"Selective breeding",
|
| 192 |
+
"Genetic engineering",
|
| 193 |
+
"Cloning (biology only)", #Individual
|
| 194 |
+
"Theory of evolution (biology only)", #Individual
|
| 195 |
+
"Speciation (biology only)", #Individual
|
| 196 |
+
"The understanding of genetics (biology only)", #Individual
|
| 197 |
+
"Evidence for evolution", #Individual
|
| 198 |
+
"Fossils", #Individual
|
| 199 |
+
"Extinction", #Individual
|
| 200 |
+
"Resistant bacteria", #Individual
|
| 201 |
+
"Classification of living organisms", #Individual
|
| 202 |
+
]
|
| 203 |
+
|
| 204 |
+
# Topic list
|
| 205 |
+
ECOLOGY_TOPICS = [
|
| 206 |
+
"Adaptations, interdependence and competition", #Group for 4 topics below
|
| 207 |
+
"Communities", #Individual
|
| 208 |
+
"Abiotic factors",#Individual
|
| 209 |
+
"Biotic factors", #Individual
|
| 210 |
+
"Adaptations", #Individual
|
| 211 |
+
|
| 212 |
+
"Organisation of an ecosystem", #Group for 4 topics below
|
| 213 |
+
"Levels of organisation", #Individual
|
| 214 |
+
"How materials are cycled", #Individual
|
| 215 |
+
"Decomposition (biology only)", #Individual
|
| 216 |
+
"Impact of environmental change (biology only) (HT only)", #Individual
|
| 217 |
+
|
| 218 |
+
"Biodiversity and the effect of human interaction on ecosystems", # Group for 6 topics below
|
| 219 |
+
"Biodiversity", #Individual
|
| 220 |
+
"Waste management", #Individual
|
| 221 |
+
"Land use", #Individual
|
| 222 |
+
"Deforestation", #Individual
|
| 223 |
+
"Global warming", #Individual
|
| 224 |
+
"Maintaining biodiversity", #Individual
|
| 225 |
+
|
| 226 |
+
"Trophic levels in an ecosystem (biology only)", #Group for 3 topics below
|
| 227 |
+
"Trophic levels", #Individual
|
| 228 |
+
"Pyramids of biomass", #Individual
|
| 229 |
+
"Transfer of biomass", #Individual
|
| 230 |
+
|
| 231 |
+
"Food production (biology only)" #Group for topics below
|
| 232 |
+
"Factors affecting food security", #Individual
|
| 233 |
+
"Farming techniques", #Individual
|
| 234 |
+
"Sustainable fisheries", #Individual
|
| 235 |
+
"Role of biotechnology", #Individual
|
| 236 |
+
"Sustainable fisheries", #Individual
|
| 237 |
+
]
|
| 238 |
+
|
| 239 |
+
mode = gr.Interface(
|
| 240 |
+
fn=select,
|
| 241 |
+
inputs=[gr.Slider(value=2, minimum=1, maximum=10, step=1)],
|
| 242 |
+
outputs=[gr.Textbox(label="greeting", lines=3)])
|
| 243 |
|
| 244 |
# Create the Gradio interface
|
| 245 |
with gr.Blocks() as demo:
|