dantedgp commited on
Commit
779f0a5
·
1 Parent(s): e41619c
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -13,8 +13,7 @@ The nucleus stores the genetic code of a living being.
13
  The peroxisome produces hydrogen peroxide used for lipid breakdown.
14
  Ribosomes are the sites of protein synthesis.
15
  Antibodies label and target pathogens for destruction.
16
- Hemoglobin is a transport protein for oxygen.
17
- Artificial intelligence can help in the discovery of new drugs."""
18
 
19
  st.set_page_config(page_title='AI Quiz Generator')
20
  st.title('AI Quiz Generator')
@@ -24,11 +23,6 @@ generate_button = st.button("Generate")
24
 
25
  if generate_button:
26
  sentences = nltk.sent_tokenize(text_input)
27
- if not sentences:
28
- st.warning('Please enter some text.')
29
  for sentence in sentences:
30
- try:
31
  output = model(f"ask: {sentence}")[0]['generated_text']
32
- st.write(output)
33
- except:
34
- st.warning('An error occurred while generating the question.')
 
13
  The peroxisome produces hydrogen peroxide used for lipid breakdown.
14
  Ribosomes are the sites of protein synthesis.
15
  Antibodies label and target pathogens for destruction.
16
+ Hemoglobin is a transport protein for oxygen."""
 
17
 
18
  st.set_page_config(page_title='AI Quiz Generator')
19
  st.title('AI Quiz Generator')
 
23
 
24
  if generate_button:
25
  sentences = nltk.sent_tokenize(text_input)
 
 
26
  for sentence in sentences:
 
27
  output = model(f"ask: {sentence}")[0]['generated_text']
28
+