Spaces:
Runtime error
Runtime error
Commit
·
229f7f9
1
Parent(s):
7f7e1a7
fixing error
Browse files
app.py
CHANGED
|
@@ -35,6 +35,9 @@ def greet(topic):
|
|
| 35 |
except wikipedia.PageError as e:
|
| 36 |
continue
|
| 37 |
break
|
|
|
|
|
|
|
|
|
|
| 38 |
print("Selected topic: ", topic)
|
| 39 |
print("Summary: ", summary)
|
| 40 |
summary = summary.replace("\n", "")
|
|
|
|
| 35 |
except wikipedia.PageError as e:
|
| 36 |
continue
|
| 37 |
break
|
| 38 |
+
if(len(topics) == 0):
|
| 39 |
+
return ["Please Type a Different Topic", gr.update(visible=True), gr.update(value="", visible=False)]
|
| 40 |
+
|
| 41 |
print("Selected topic: ", topic)
|
| 42 |
print("Summary: ", summary)
|
| 43 |
summary = summary.replace("\n", "")
|