manu commited on
Commit
3ac2e64
β€’
1 Parent(s): ee846ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -12,10 +12,9 @@ default_passage = wikipedia.summary("pirate code", sentences=2)
12
 
13
  def update_passage(passage_name):
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:
21
  sum = "Please specify your article name differently"
 
12
 
13
  def update_passage(passage_name):
14
  try:
15
+
16
+ sum=wikipedia.summary(wikipedia.search(passage_name)[0], sentences=2)
17
+ print(sum, wikipedia.search(passage_name))
 
18
  passage.value = sum
19
  except:
20
  sum = "Please specify your article name differently"