Spaces:
Sleeping
Sleeping
Forgot to add ask promp
Browse files
app.py
CHANGED
|
@@ -13,13 +13,13 @@ st.title('AI Quiz Generator')
|
|
| 13 |
text_input = st.text_area(
|
| 14 |
'Enter your text',
|
| 15 |
value="""Algae cells can be used to synthesize lipids for the production of biofuels and foods.
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
height=200
|
| 24 |
)
|
| 25 |
|
|
@@ -31,7 +31,7 @@ if generate_button:
|
|
| 31 |
st.warning('Please enter some text.')
|
| 32 |
for sentence in sentences:
|
| 33 |
try:
|
| 34 |
-
question = model(sentence)[0]['generated_text']
|
| 35 |
st.write(question)
|
| 36 |
except:
|
| 37 |
st.warning('An error occurred while generating the question.')
|
|
|
|
| 13 |
text_input = st.text_area(
|
| 14 |
'Enter your text',
|
| 15 |
value="""Algae cells can be used to synthesize lipids for the production of biofuels and foods.
|
| 16 |
+
Integral transmembrane proteins shuttle nutrients in and out of the cell.
|
| 17 |
+
Liver cells can metabolize poisons and alcohol.
|
| 18 |
+
Chocolate helps the brain stay focused.
|
| 19 |
+
Cellular respiration is the inverse of photosynthesis.
|
| 20 |
+
Caffeine blocks adenosine receptors.
|
| 21 |
+
Adenosine Triphosphate (ATP) is the ernergy currency of the cell.
|
| 22 |
+
The mitochondria is the powerhouse of the cell.""",
|
| 23 |
height=200
|
| 24 |
)
|
| 25 |
|
|
|
|
| 31 |
st.warning('Please enter some text.')
|
| 32 |
for sentence in sentences:
|
| 33 |
try:
|
| 34 |
+
question = model(f"ask: {sentence}")[0]['generated_text']
|
| 35 |
st.write(question)
|
| 36 |
except:
|
| 37 |
st.warning('An error occurred while generating the question.')
|