Spaces:
Runtime error
Runtime error
Commit
·
a1f74de
1
Parent(s):
df4fcdc
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ tool = language_tool_python.LanguageToolPublicAPI('en-US')
|
|
56 |
st.title("NLP Testing and Scoring App")
|
57 |
|
58 |
# Ask for the topic at the start
|
59 |
-
topic = st.text_input("Enter a topic
|
60 |
|
61 |
# Web scraping and text cleaning
|
62 |
entity = "Florida" # You can replace this with the user's topic input
|
@@ -145,12 +145,13 @@ if generate_quiz:
|
|
145 |
|
146 |
# Filter out invalid and empty questions
|
147 |
x = 0
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
|
|
154 |
# Ensure you have valid questions
|
155 |
if not questions:
|
156 |
st.write("No valid questions to process.")
|
|
|
56 |
st.title("NLP Testing and Scoring App")
|
57 |
|
58 |
# Ask for the topic at the start
|
59 |
+
topic = st.text_input("Enter a topic:")
|
60 |
|
61 |
# Web scraping and text cleaning
|
62 |
entity = "Florida" # You can replace this with the user's topic input
|
|
|
145 |
|
146 |
# Filter out invalid and empty questions
|
147 |
x = 0
|
148 |
+
while x > len(questions):
|
149 |
+
for i in questions:
|
150 |
+
if len(i) == 1:
|
151 |
+
questions.pop(x)
|
152 |
+
x = x + 1
|
153 |
+
else:
|
154 |
+
x = x + 1
|
155 |
# Ensure you have valid questions
|
156 |
if not questions:
|
157 |
st.write("No valid questions to process.")
|