Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def update_passage(passage_name):
|
|
14 |
try:
|
15 |
sum = wikipedia.summary(passage_name, sentences=2)
|
16 |
print(sum)
|
17 |
-
if isinstance(
|
18 |
sum=wikipedia.summary(wikipedia.search(passage_name)[0], sentences=2)
|
19 |
passage.value = sum
|
20 |
except:
|
|
|
14 |
try:
|
15 |
sum = wikipedia.summary(passage_name, sentences=2)
|
16 |
print(sum)
|
17 |
+
if isinstance(sum, list):
|
18 |
sum=wikipedia.summary(wikipedia.search(passage_name)[0], sentences=2)
|
19 |
passage.value = sum
|
20 |
except:
|